mysql import script by query instead of bash
Posted
by vick
on Stack Overflow
See other posts from Stack Overflow
or by vick
Published on 2010-05-09T10:26:11Z
Indexed on
2010/05/09
10:38 UTC
Read the original article
Hit count: 191
mysql
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
© Stack Overflow or respective owner