我有这个代码:
$dbh = new PDO("mysql:host=$dbHost;dbname=$dbName", $dbUser, $dbPassword);
$sth = $dbh->prepare(" SELECT `login`, `password` FROM `admins` WHERE `login` = ?, `password` = ? ");
var_dump($sth->bindParam(1, $login)); // true
var_dump($sth->bindParam(2, $password)); // true
var_dump($sth->execute()); // false