Location: PHPKode > scripts > MySQL Dumper > mysql-dumper/readme.html
<html>
	<head>
		<title>PHP Class Mysqldumper</title>
		<style type="text/css">
			a { color: #000090; text-decoration: none; }
			a:hover, a:active, a:focus { color: highlighttext; background-color: highlight; text-decoration: none; }
			
			body { background : #FFFFFF; }
			body, table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; }
			.info-box-body { border: 1px solid #999999; padding: .5em; }
			.page-body { max-width: 800px; margin: auto; }
			.short-description { font-weight: bold; color: #666666; }
			.line-number {  }
			.class-name { color: #0000AA; font-weight: bold; }
		</style>
	</head>
	
	<body>
		<h2 class="class-name">MysqlDumper</h2>
		<div class="info-box">
			<div class="info-box-body">
				<p class="short-description">MySQLdumper is a small PHP class that lets you generate a dump of a MySQL database  with just 2 lines of code. The dump can be used as a database backup. The dump  is a valid MySQL-query in plain text. It doesn't depend on the 'mysqldump' command  line utility, so you won't encounter a problem if this isn't available on the server.</p>
				<p>
					<p>Example 1: Create a database dump.  
						<ol>
							<code>
									<li>$dumper = new Mysqldumper(&quot;localhost&quot;, &quot;user&quot;, &quot;password&quot;, &quot;databasename&quot;);</li>
									<li>$dumpstring = $dumper-&gt;createDump();</li>
							</code>
						</ol>
					</p>
					
					<p>Example 2: Create a database drump with a 'DROP TABLE IF EXISTS'-statement for each table.
						<code>
							<ol>
								<li>$dumper = new Mysqldumper(&quot;localhost&quot;, &quot;user&quot;, &quot;password&quot;, &quot;databasename&quot;);</li>
								<li>$dumper-&gt;setDroptables(true);</li>
								<li>$dumpstring = $dumper-&gt;createDump();</li>
							</ol>
						</code>
					</p>
					<p>Example 3: Create dumps of different databases.
						<code>
							<ol>
								<li>$dumper = new Mysqldumper(&quot;localhost&quot;, &quot;user&quot;, &quot;password&quot;, &quot;database1&quot;);</li>
								<li>$dumpstring1 = $dumper-&gt;createDump();</li>
								<li>$dumper-&gt;setDBname(&quot;database2&quot;);</li>
								<li>$dumpstring2 = $dumper-&gt;createDump();</li>
							</ol>
						</code>
					</p>
				</p>				
				<ul>
					<li>license: GNU/LGPL</li>
					<li>copyright: Dennis Mozes</li>
					<li>since: PHP 4.0</li>
					<li>author: Dennis Mozes &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
					<li>version: 1.0</li>
					<li>download: <a href="http://www.mosix.nl/mysqldumper">http://www.mosix.nl/mysqldumper</a></li>
				</ul>
			</div>	
		</div>
	</body>
</html>
Return current item: MySQL Dumper