I know this is more of an php question, but I think that some of the mysql people that use PHP might want to know about this in case they need it since it is for accessing a dump of a mysql database.
I found two ways of doing this: 1. (using the exec() method) exec("mysqldump -q -u$userName -p$password -h$hostName $databaseName",$test); foreach($test as $line) echo "$line<br>"; 2. (using the backtick method) $result = `mysqldump -q -u$userName -p$password -h$hostName $databaseName`; echo nl2br($result); Thank all of you for your help. Steve -----------original message------------ I am using PHP to run the following command: passthru("mysqldump -q -u$userName -p$password -h$hostName $databaseName"); The problem is that it puts EVERYTHING on one line and, of course, and wraps it. I want to be able to dump the dump(schema) of a database onto a web page so that they can view and/or cut and paste the dump results. An other question. How can I make the command automatically try to send it as a file to the clients computer as an database.sql file so that they can save it? Like phpmyadmin does. Thank You in Advance Steve --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php