In mysql, what is the meaning of: id and: id & gt; $ orderid? $ Agentid = pdo_fetchcolumn ('select agentid from '. tablename ('shop _ order ').'
Where id =: idLimit 1', array (
': ID' => $ orderid
));
In mysql, what does id =: id and ': ID' => $ orderid mean?
: Is id a placeholder?
$ Orderid is a parameter?
Reply to discussion (solution)
SQL command select agentid from '. tablename ('shop _ order'). 'where id =: id limit 1
In: id is the parameter name of parameterized expression
The second parameter array (': ID' => $ orderid)
In: id is to replace the parameter name: id with the real variable $ orderid
SQL command select agentid from '. tablename ('shop _ order'). 'where id =: id limit 1
In: id is the parameter name of parameterized expression
The second parameter array (': ID' => $ orderid)
In: id is to replace the parameter name: id with the real variable $ orderid
Can this be used only in mysqli?
Both mysqli and PDO can be used.
MySQL itself supports parameterized query
But php_mysql extensions are not supported.