If anybody is interested, the PHP version is: 5.3.4RC2 and MySQL's is: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $推荐答案这似乎是 php bug :PDO忽略PARAM_INT常量,并使用$limit和$limitvalue变量作为字符串.绑定时在查询中引用哪个.This seems to be a php bug : PDO ignores the PARAM_INT constant and use the $limit and $limitvalue variables as string. Which are quoted in the query when bound.尝试使用:$sql->bindParam(1, (int)$limitvalue, PDO::PARAM_INT);$sql->bindParam(2, (int)$limit, PDO::PARAM_INT);强制变量类型为int.To force the variables type to int. 这篇关于PDO Mysql语法错误1064的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-13 12:20