0
我有一个名为script.sql的文件mysql通过查询而不是bash导入脚本
我该如何使用q mysql查询来运行该文件?
global $sql;
$res = $sql->query("\. /script.sql")or die(mysql_error());
给出:
#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
这听起来很棘手! – vick 2010-05-09 10:28:43
不是很有用。 – 2010-05-09 10:29:37
@vick:是的。有解析SQL的例程,但我还没有看到一个用于PHP的例程。 – 2010-05-09 10:30:37