Re: novice: how to run .sql script from php?

From: Date: Sun, 29 May 2005 23:10:19 +0000
Subject: Re: novice: how to run .sql script from php?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-215971@lists.php.net to get a copy of this message
tony yau wrote:
I realised that there is a fundamental problem with using mysql_query( ...) to run a .sql script to setup a database, and that was the database needs to be there in the first place for php to connect to! also there was a lot of comment lines in the script that was causing problem. ... so I gave up trying to parse the file. instead I did this 1) create the database with phpmyadmin etc
so you have phpmyadmin installed. good. now while you have the database selected, 2) click the SQL (it's in the toolbar in the right frame) 3) click "Browse..." button, find the .sql file, click OK 4) click the bottom "Go" button, wait and relax

« previous php.general (#215971) next »