您正在尝试绑定,
$litpre但是已经绑定了
CONCAt(language,'-',pre)。您
?的查询中有5个,但是您试图绑定6个参数。
将您的代码更改为此:
Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE literatures set spot = ?, pre = ?, language = ?, count = ?, litpre = ? WHERe id = ?";$q = $pdo->prepare($sql); $q->execute(array($spot,$pre,$language,$count,$litpre,$id)); Database::disconnect();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)