RE: [PHP-DB] Using PHP to import a DB
| From: | Robbert van Andel | Date: | Sun, 06 Nov 2005 00:10:30 +0000 |
| Subject: | RE: [PHP-DB] Using PHP to import a DB | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40599@lists.php.net to get a copy of this message | ||
You could run a system command from the web browser to import the text file.
If you have access to PHPmyAdmin, you could use it to then import the file.
Or finally, you should be able to read the contents of the file into a
variable (if it's small enough) and then run the query using mysql_query.
My personal preference is phpmyadmin. It's a very good database interface
and can be retrieved from http://www.phpmyadmin.net/home_page/
Robbert van Andel
-----Original Message-----
From: Todd Cary [mailto:todd@aristesoftware.com]
Sent: Saturday, November 05, 2005 4:02 PM
To: php-db@lists.php.net
Cc: Chris Herron
Subject: [PHP-DB] Using PHP to import a DB
My client switched from a dedicated server to a shared server, so I
cannot use the command line to import a DB that was produced with
mysqldump. Can I duplicate "mysql -u user -p db < /tmp/mydb" with php?
Any suggestions are greatly appreciated....
Todd
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php