This is a discussion on executing .sql file within the alt.comp.lang.php forums, part of the PHP Programming Forums category; How do I execute a .sql file for creating a mysql database using php? THanks, Ike...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 2004-01-30, Ike <rxv@hotmail.com> wrote:
> How do I execute a .sql file for creating a mysql database using php? I assume the .sql file is only a text file containing mysql queries. If you have access to a shell, mysql -u username -p < file.sql If you don'th ave access to a shell, you could write a little script that reads the file line by line, and calls mysql_query($line); Or you could simply upload the file to phpmyadmin, ... -- http://home.mysth.be/~timvw |