Location: PHPKode > scripts > SQL Export > sql-export/readme.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-family: "Courier New", Courier, mono}
-->
</style></head>

<body>
<h1><strong>SQL_Export class</strong></h1>
<p>(c) 2004 by Adam Globus-Hoenich<br>
  <a href="mailto:hide@address.com">hide@address.com</a><br>
  <a href="http://www.phenaproxima.net">www.phenaproxima.net</a></p>
<p>This is the readme file which should accompany the SQL_Export class (SQL_Export.php). Redistribute the file if you like, but this readme must always accompany it. You are free to use SQL_Export in any way you see fit and you can modify it if you want, but it stays copyrighted to me.</p>
<p>SQL_Export is a simple PHP class to export MySQL database data, one table at a time, in raw SQL format. You pass to it an array of table names to export, and it will return raw SQL. You can do this with two lines of code, so it's very easy to use. SQL_Export is meant to MySQL databases only.</p>
<p>Here's a simple example of how to use SQL_Export, assuming you want to export table1, table2, and table3 from the database 'sample':</p>
<blockquote>
  <p class="style1">require(&quot;SQL_Export.php&quot;);<br>
    $t = array(&quot;table1&quot;, &quot;table2&quot;, &quot;table3&quot;);<br>
    $exporter = new SQL_Export(&quot;localhost:3306&quot;, &quot;username&quot;, &quot;password&quot;, &quot;sample&quot;, $t);<br>
    $sql = $exporter-&gt;export();</p>
</blockquote>
<p>The variable $sql will be plain SQL which you can further work with, if you want.</p>
<p>I hope you find this class useful. Any comments, questions, bugs, or good jokes you've heard lately? Send it all to <a href="mailto:hide@address.com">hide@address.com</a>. Cheers folks.</p>
</body>
</html>
Return current item: SQL Export