I am trying to run a series of sql queries through PHP code. The queries are created on my client machine by automated code and are uploaded to the server.
The same queries (it is a series of 30 to 60 "SELECT" and "INSERT" queries) work fine if I paste them together in the PhpMyAdmin window. Or use the file browse feature of PhpMyAdmin.
However when I try to run them using PHP code it fails. I verified connection to the server. I can also run other simple select queries if I hardcode them.
Here is the extract of my code.
Code: Select all
$file = 'sql.txt';
$content = file_get_contents($file);
echo $content;
mysql_query($content, $conn);Thank you