php mysql_query() issue

Soldato
Joined
30 Jun 2003
Posts
2,807
Location
Berkshire
ok been doing some simple php stuff trying to get a script to import an .sql file from the directory it's inside the error we're getting is "No input file specified."

Suggestions?

Code:
<?php 
error_reporting(E_ALL);
include_once '../db.php';
// Perform Query
$result = mysql_query(source './account.sql');
echo($result);
}
?>
 
I have never seen mysql_query() used like this. Personally, post mysql_connect i declare all the sql in variables which i then call inside mysql_query();

I can't see mysql_query() working with two words seperated with a space and no quotes surrounding it. How i would suggest you run it is mysql_query('source codelocation.sql');

Hope this helps.
 
Back
Top Bottom