v5:reference:connection:param
This is an old revision of the document!
param
Description
The function param returns a database-specific placeholder for a prepared query statement.
This method is used with bind variable SQL statement execution, to produce injection resistant code.
On RDBMS with positional (numbered) query parameters such as PostgreSQL, calling param(false)
will reset the parameter counter, allowing to start building a new query.
Usage
/* * Connection to Oracle database */ print $db->param('account'); /* * prints ':account' */
/* * Connection to IBM DB2 database */ print $db->param('account'); /* * prints ? */
/* * Connection to Postgres database */ print $db->param('account'); /* * prints $1 */
v5/reference/connection/param.1579906129.txt.gz · Last modified: 2020/01/24 23:48 by dregad