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

2005-05-30 Thread tony yau
at the depth of execQuery(), an in-house function, it has already selected a database, (default for the project). my apologise for saying problem with using mysql_query( ...), it was my misunderstanding of this in-house function. Now I can run the script with Create database ... in the script.

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

2005-05-29 Thread tony yau
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

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

2005-05-29 Thread M. Sokolewicz
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

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

2005-05-29 Thread Rory Browne
On 5/29/05, tony yau [EMAIL PROTECTED] 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

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

2005-05-29 Thread Marek Kilimajer
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

[PHP] novice: how to run .sql script from php?

2005-05-27 Thread tony yau
Hi All, I got this .sql script that setup the whole db schema, I can run mysql.exe to run on my pc but when it goes to a hosting company's server I don't have that command! So I tried to include(setup.sql) into a string and send that as one long sql query. BUT I need to get rid of all

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

2005-05-27 Thread John Nichel
tony yau wrote: Hi All, I got this .sql script that setup the whole db schema, I can run mysql.exe to run on my pc but when it goes to a hosting company's server I don't have that command! So I tried to include(setup.sql) into a string and send that as one long sql query. BUT I need to

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

2005-05-27 Thread Rory Browne
I'm assuming that the .sql file consists of a list of MySQL queries, that when performed sequentially will set up your system. That being the case, the perfered way ot install the thing is to do a 'mysql [host/username/password parameters] file.sql'. I believe you can also run file.sql scripts