I don't know if it will work - but have you tried using SOURCE in the mysql query?
From: Daevid Vincent [mailto:daevid@stripped]
Sent: Tuesday, October 10, 2006 11:01 AM
Subject: What's the PHP equivallent of "mysql mydb < somefile.sql"
Currently I run an 'updater' script to run through a directory of .sql files using
something like this in PHP:
$COMMAND = "mysql ".$OPTION['db_prefix'].$db." < ".$mydir.$filename;
What would be the equivallent way to to this in a PHP mysql_query(""); way?
I see "LOAD", but that only works for data it seems.
These scripts I use have ALTER statements and CREATE and all other types of SQL in them
and almost no data actually.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1