Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
bind ($key, &$value, $dataType=ParameterType::STRING, $length=0, $driverOptions=[]) | |
unbind ($key) | |
& | getBounded ($key=null) |
Joomla Database Query Preparable Interface.
Adds bind/unbind methods as well as a getBounded() method to retrieve the stored bounded variables on demand prior to query execution.
bind | ( | $key, | |
& | $value, | ||
$dataType = ParameterType::STRING , |
|||
$length = 0 , |
|||
$driverOptions = [] |
|||
) |
Method to add a variable to an internal array that will be bound to a prepared SQL statement before query execution.
array | string | integer | $key | The key that will be used in your SQL query to reference the value. Usually of the form ':key', but can also be an integer. |
mixed | $value | The value that will be bound. It can be an array, in this case it has to be same length of $key; The value is passed by reference to support output parameters such as those possible with stored procedures. |
array | string | $dataType | Constant corresponding to a SQL datatype. It can be an array, in this case it has to be same length of $key |
integer | $length | The length of the variable. Usually required for OUTPUT parameters. |
array | $driverOptions | Optional driver options to be used. |
Implémenté dans DatabaseQuery.
& getBounded | ( | $key = null | ) |
Retrieves the bound parameters array when key is null and returns it by reference. If a key is provided then that item is returned.
mixed | $key | The bounded variable key to retrieve. |
Implémenté dans DatabaseQuery.
unbind | ( | $key | ) |
Method to unbind a bound variable.
array | string | integer | $key | The key or array of keys to unbind. |
Implémenté dans DatabaseQuery.