我正在使用一个简单SELECT
的 in PDO
:
$status = 'subscribed';
$statement = $pdo->prepare("select id_user from user where status = :status");
$statement->bindParam(':status', $status);
$statement->execute();
$row = $statement->fetch();
print_r($row);
为什么会返回:
Array ( [id_user] => 9 [0] => 9 )
代替:
Array ( [id_user] => 9 )