-1

我有一个对 SHOW TABLES 的简单调用,我得到一个 1064 语法错误。

$query = $this->db->query("SHOW TABLES LIKE docx_setting");

返回以下错误:

Notice: Error: 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 
'docx_setting' at line 1

Error No: 1064
SHOW TABLES LIKE docx_setting in
/home/username/dev/web/application/system/database/mysql.php on line 50

我用谷歌搜索了很多,没有发现我的语法有任何问题。LIKE 只支持一种模式,所以这应该没问题。

有任何想法吗?

谢谢。

——文斯

4

1 回答 1

1

字符串必须被引用

SHOW TABLES LIKE 'docx_setting'
于 2013-03-26T02:21:29.687 回答