Php PDO Sql联合查询显示错误

Php PDO Sql联合查询显示错误,php,sql,pdo,Php,Sql,Pdo,我尝试在PHP PDO中运行此SQL查询: 但我得到的结果是: 致命错误:未捕获异常“PDOException”,消息为“SQLSTATE[HY093]:无效参数编号:未在/home/integra/public_html/service_status/index.php:48堆栈跟踪:0/home/integra/public_html/service_status/index.php48:PDOStatement->executeArray 1/home/integra/public_htm

我尝试在PHP PDO中运行此SQL查询:

但我得到的结果是:

致命错误:未捕获异常“PDOException”,消息为“SQLSTATE[HY093]:无效参数编号:未在/home/integra/public_html/service_status/index.php:48堆栈跟踪:0/home/integra/public_html/service_status/index.php48:PDOStatement->executeArray 1/home/integra/public_html/index.php124:包含“/home/integra/p..2{main}”在第48行的/home/integra/public_html/service_status/index.php中抛出,您将通过:

':category1' => $result["sequence"]
在execute语句中,当查询读取时:

where type <> :type1 and category1 = :category and
如你所愿。直接在查询中使用该函数:

maintenance_fromdate <= DATE_ADD(NOW(), INTERVAL 7 DAY)
':maintenance_fromdate' => 'DATE_ADD(NOW(), INTERVAL 7 DAY)'
maintenance_fromdate <= DATE_ADD(NOW(), INTERVAL 7 DAY)