What is the difference between bindParam and bindValue?
问题 What is the difference between PDOStatement::bindParam() and PDOStatement::bindValue()? 回答1: The answer is in the documentation for bindParam: Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called. And execute call PDOStatement::bindParam() to bind PHP variables to the parameter markers: bound variables pass their value as input and receive the output value, if any, of their associated parameter