什麼事的傢伙()函數,PHP bindParam多參數
我有以下代碼:
$selectUserQuery = 'SELECT email_address, password FROM user WHERE email_address = :email_address AND password = :password';
$prepSelectUser = $conn->prepare($selectUserQuery);
/*
* HOW DO I ADD MULTIPLE PARAMETERS TO THIS BINDPARAM() FUNCTION?
*/
$prepSelectUser->bindParam(':email_address', $email, PDO::PARAM_INT);
$prepSelectUser->execute();
$userResult = $prepSelectUser->fetchAll();
$userCount = count($userResult);
我怎樣才能多參數添加到bindParam()函數?
糟糕,是的,錯誤。它不會造成任何麻煩? – user3456043
您只需要爲每個要綁定的參數調用'bindParam()'一次 – DaveRandom