SQL_Export class

(c) 2004 by Adam Globus-Hoenich

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.

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.

Here's a simple example of how to use SQL_Export, assuming you want to export table1, table2, and table3 from the database 'sample':

$t = array("table1", "table2", "table3");
$exporter = new SQL_Export("localhost:3306", "username", "password", "sample", $t);
$sql = $exporter->export();

The variable $sql will be plain SQL which you can further work with, if you want.

I hope you find this class useful. Any comments, questions, bugs, or good jokes you've heard lately? Send it all to phreakpq@995.ca. Cheers folks.