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