What does ":" mean when using bindValue() in PHP PDO? -
what :
mean before id
in example below? necessary?
$sth->bindvalue(':id', $id, pdo::param_int);
can :id
variable?
if pdo::param_int
not necessary, why need use it?
:id
named placeholder prepared query. somewhere else in code there's query along lines of:
select stuff id = :id
that gets run through pdo's prepare
function.
if
pdo::param_int
not necessary, why need use it?
safety / data consistency. see pdo::param_int important in bindparam?
Comments
Post a Comment