odbc_exec():SQL错误:[Microsoft] [ODBC Microsoft Access驱动程序]语法错误(缺少运算符)

时间:2017-05-17 12:14:38

标签: php sql ms-access odbc

下面的SQL语句抛出上面的错误。我也许相信这是一个语法错误。我试图使用PHP执行此MS Access SQL语句任何帮助非常感谢。

$parm1 = "'TPMS'";
$parm3 = "'Gen 3'";

$sql = "SELECT * FROM archive where productfamily like $parm1 and where productmodel like $parm3 order by fullname asc";

1 个答案:

答案 0 :(得分:2)

您的查询中不能有多个where。像这样使用单where

$sql = "SELECT * FROM archive where productfamily like $parm1 and productmodel like $parm3 order by fullname asc";