Answer the question
In order to leave comments, you need to log in
PDO, is it mandatory to use constants?
Is it necessary to specify PDO::PARAM_INT (PDO::PARAM_STR, etc.) as well, or does it make no sense without the bindParam constant? $query -> bindParam(':id', $id);
Answer the question
In order to leave comments, you need to log in
no.
public bool PDOStatement::bindParam ( mixed $parameter , mixed &$variable [, int $data_type = PDO::PARAM_STR
is a string by default, MYSQL works with them correctly. problems can be with complex types and/or locales. like format default date, decimal separator, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question