Re: What are the PHP Data Objects?
PDO uses class constants since PHP 5.1. Older versions use global constants in the form PDO_PARAM_BOOL. The following are some more predefined constants :
- PDO:: PARAM_INPUT_OUTPUT (integer) - Specifies that the parameter is an INOUT parameter for a stored procedure. You must use the OR operator with a data type explicit PDO:: PARAM_ *.
- PDO:: FETCH_NAMED (integer) - Specifies that the fetch method shall return each row as an array indexed by column name as returned in the corresponding result set. If the result set contains multiple columns with the same name, PDO:: FETCH_NAMED returns an array of values per column name.
- PDO:: FETCH_NUM (integer) - Specifies that the fetch method shall return each row as an array indexed by column number as returned in the corresponding result set, starting at 0.
- PDO:: FETCH_OBJ (integer) - Specifies that the fetch method shall return each row as an object with property names corresponding to the column names as returned in the result set.
"When they give you ruled paper, write the other way..." J.R.J.
Bookmarks