mysql import script by query instead of bash
- by vick
I have a file called script.sql
how can I run that file using q mysql query?
global $sql;
$res = $sql->query("\. /script.sql")or die(mysql_error());
gives:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\. /script.sql' at line 1