我的代码:
$myArray = implode($myArray, ',');
$sth = $dbh->prepare('SELECT foo FROM bar WHERE ids IN (:ids)');
$sth->bindParam(':ids', $myArray);
$sth->execute();
$result = $sth->fetch();
echo $sth->rowCount();
总是显示1的计数,但是当我跳过参数化并仅将变量本身添加到其位置时,我得到了准确的计数。这里发生了什么?
慕少森