Constant |
Value |
Description |
|---|---|---|
MODE_ASSOC |
2 |
Data indexed by column names (associative array). |
MODE_DEFAULT |
0 |
Default fetch mode if none specified. |
MODE_FLIPPED |
4 |
Column names as top-level keys; rows as second-level keys. |
MODE_OBJECT |
3 |
Data as objects with properties corresponding to column names. |
MODE_ORDERED |
1 |
Data indexed numerically by column order. |
Value |
Description |
|---|---|
clob |
Parameter type clob (character large object). |
timestamp |
Parameter type timestamp (date and time value). |
decimal |
Parameter type decimal (fixed-precision value). |
integer |
Parameter type integer (whole numbers that range from -2,147,483,647 to 2,147,483,647). |
text |
Parameter type text (textual data) |
Methods
Method |
Parameters |
Parameter description |
Return |
Description |
|---|---|---|---|---|
fetchAll |
•[$fetchMode: int = MODE_DEFAULT] •[$rekey: bool = false] •[$force_array: bool = false] •[$group: bool = false] |
•Fetch mode to use (default: MODE_DEFAULT) •If set to true, return array will have the first column as its first dimension •Used only when the query returns exactly two columns. If true, the values of the returned array will be one-element arrays instead of scalars •If true, the values of the returned array is wrapped in another array. If the same key value (in the first column) repeats itself, the values will be appended to this array instead of overwriting the existing values |
array<mixed> |
Returns fetched alll rows from the query.
Parameters defined with [] are optional.
|
fetchCol |
•[$colNum: int = 0] |
•The column number to fetch (default: 0) |
array<mixed> |
Returns values of the specified column. |
fetchOne |
•[$colNum: int = 0] •[$rowNum: int|null = null] |
•Column number to fetch (default: 0) •Row number to fetch (default: first row) |
mixed |
Returns the fetched single value from the result. |
fetchRow |
•[$fetchMode: int = MODE_DEFAULT] •[$rowNum: int|null = null] |
•Fetch mode to use (default: MODE_DEFAULT) •Row number to fetch (default: first row) |
array<mixed> |
Returns data array on success; otherwise a error on failure. |