How to run series of SQL statements stored in a .text file in PHP?

Grabbajabba

New Member
I store such sqls in a text file:\[code\]insert into table ...;...insert into table ...;\[/code\]How to executable all those statements with PHP? It seems \[code\]mysql_query()\[/code\] can only execute 1 statement every time.UPDATEThe reason I don't do it in command line like this \[code\]mysql -u your_user_name -p -D your_database_name < your_sql_file.txt;\[/code\]is that it won't work when there's multi-byte characters in \[code\]your_sql_file.txt\[/code\], will get stuff like \[code\]?
 
Back
Top