0

我有这个代码:

$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
4

1 回答 1

3
WHERE `login` = ?, `password` = ?

那不应该是……

WHERE `login` = ? and `password` = ?
于 2013-01-21T21:39:45.363 回答