Hi guys, im trying to create my tables via php using my sql files for my setup script.
I cant seem to work it out, heres what i have so far (wrong).
if($create_tables==yes)
{
$fp = @readfile("$root_dir/xxxxxx.sql");
if(!fp)
{
$error = "Could not open $root_dir/xxxxxxx.sql.<br>
Please ensure file is uploaded with correct permissions";
}
elseif($fp)
{
///this is what i want to use to query mysql with the sql file
mysql_query($fp);
}
}
Any ideas how to fix what i have done?