Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (\mysqli $connection, string $query) | |
prepareParameterKeyMapping ($sql) | |
bindParam ($parameter, &$variable, string $dataType=ParameterType::STRING, ?int $length=null, ?array $driverOptions=null) | |
closeCursor () | |
errorCode () | |
errorInfo () | |
execute (?array $parameters=null) | |
fetch (?int $fetchStyle=null, int $cursorOrientation=FetchOrientation::NEXT, int $cursorOffset=0) | |
fetchColumn ($columnIndex=0) | |
rowCount () | |
setFetchMode (int $fetchMode,... $args) | |
Attributs protégés | |
$bindedValues | |
$parameterKeyMapping | |
$parameterTypeMapping | |
$columnNames | |
$connection | |
$defaultFetchStyle = FetchMode::MIXED | |
$query | |
$rowBindedValues | |
$statement | |
$typesKeyMapping | |
Fonctions membres privées | |
bindValues (array $values) | |
fetchData () | |
Attributs privés | |
$result = false | |
__construct | ( | \mysqli | $connection, |
string | $query | ||
) |
Constructor.
\mysqli | $connection | The database connection resource |
string | $query | The query this statement will process |
PrepareStatementFailureException |
Références MysqliStatement\$connection, MysqliStatement\$query, $this, et MysqliStatement\prepareParameterKeyMapping().
bindParam | ( | $parameter, | |
& | $variable, | ||
string | $dataType = ParameterType::STRING , |
||
?int | $length = null , |
||
?array | $driverOptions = null |
||
) |
Binds a parameter to the specified variable name.
string | integer | $parameter | Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name . For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter. |
mixed | $variable | Name of the PHP variable to bind to the SQL statement parameter. |
integer | $dataType | Constant corresponding to a SQL datatype, this should be the processed type from the QueryInterface. |
integer | $length | The length of the variable. Usually required for OUTPUT parameters. |
array | $driverOptions | Optional driver options to be used. |
Implémente StatementInterface.
|
private |
Binds a array of values to bound parameters.
array | $values | The values to bind to the statement |
Références $key, $params, et $value.
Référencé par MysqliStatement\execute().
closeCursor | ( | ) |
Closes the cursor, enabling the statement to be executed again.
Implémente StatementInterface.
errorCode | ( | ) |
Fetches the SQLSTATE associated with the last operation on the statement handle.
Implémente StatementInterface.
errorInfo | ( | ) |
Fetches extended error information associated with the last operation on the statement handle.
Implémente StatementInterface.
execute | ( | ?array | $parameters = null | ) |
Executes a prepared statement
array | null | $parameters | An array of values with as many elements as there are bound parameters in the SQL statement being executed. |
Implémente StatementInterface.
Références MysqliStatement\$columnNames, $key, $parameters, $params, $this, $value, MysqliStatement\bindValues(), elseif, et null.
fetch | ( | ?int | $fetchStyle = null , |
int | $cursorOrientation = FetchOrientation::NEXT , |
||
int | $cursorOffset = 0 |
||
) |
Fetches the next row from a result set
integer | null | $fetchStyle | Controls how the next row will be returned to the caller. This value must be one of the FetchMode constants, defaulting to value of FetchMode::MIXED. |
integer | $cursorOrientation | For a StatementInterface object representing a scrollable cursor, this value determines which row will be returned to the caller. This value must be one of the FetchOrientation constants, defaulting to FetchOrientation::NEXT. |
integer | $cursorOffset | For a StatementInterface object representing a scrollable cursor for which the cursorOrientation parameter is set to FetchOrientation::ABS, this value specifies the absolute number of the row in the result set that shall be fetched. For a StatementInterface object representing a scrollable cursor for which the cursorOrientation parameter is set to FetchOrientation::REL, this value specifies the row to fetch relative to the cursor position before fetch() was called. |
Implémente StatementInterface.
Références MysqliStatement\$defaultFetchStyle, $this, FetchMode\ASSOCIATIVE, FetchMode\COLUMN, MysqliStatement\fetchColumn(), MysqliStatement\fetchData(), FetchMode\MIXED, null, FetchMode\NUMERIC, et FetchMode\STANDARD_OBJECT.
Référencé par MysqliStatement\fetchColumn().
fetchColumn | ( | $columnIndex = 0 | ) |
Returns a single column from the next row of a result set
integer | $columnIndex | 0-indexed number of the column you wish to retrieve from the row. If no value is supplied, the first column is retrieved. |
Références MysqliStatement\fetch(), null, et FetchMode\NUMERIC.
Référencé par MysqliStatement\fetch().
|
private |
Fetch the data from the statement.
Références $return.
Référencé par MysqliStatement\fetch().
prepareParameterKeyMapping | ( | $sql | ) |
Replace named parameters with numbered parameters
string | $sql | The SQL statement to prepare. |
Référencé par MysqliStatement\__construct().
rowCount | ( | ) |
Returns the number of rows affected by the last SQL statement.
Implémente StatementInterface.
setFetchMode | ( | int | $fetchMode, |
$args | |||
) |
Sets the fetch mode to use while iterating this statement.
integer | $fetchMode | The fetch mode, must be one of the FetchMode constants. |
mixed | ...$args Optional mode-specific arguments. |
Implémente StatementInterface.
|
protected |
|
protected |
Référencé par MysqliStatement\execute().
|
protected |
Référencé par MysqliStatement\__construct().
|
protected |
Référencé par MysqliStatement\fetch().
|
protected |
|
protected |
|
protected |
Référencé par MysqliStatement\__construct().
|
private |
|
protected |
|
protected |
|
protected |