I am confused about Bind using! Is there any difference between those two codes below?
$stmt->bindValue( ":password", $password, PDO::PARAM_INT );
$stmt->bindParam(':password',$password);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to PHP.Net,
so using bindParam(), if you change the variable before calling execute(), it will use the changed value. bindValue(), will evaluate it immediately and use that value not caring about any changes after calling bindValue() but before execute().