diff --git a/reference/pdo/functions/PDO-lastInsertId.xml b/reference/pdo/functions/PDO-lastInsertId.xml index 95b9e9ab90..f516f5b10b 100644 --- a/reference/pdo/functions/PDO-lastInsertId.xml +++ b/reference/pdo/functions/PDO-lastInsertId.xml @@ -1,5 +1,5 @@ - + @@ -17,13 +17,15 @@ Returns the ID of the last inserted row, or the last value from a - sequence object, depending on the underlying driver. + sequence object, depending on the underlying driver. For example, + PDO_PGSQL requires you to specify the name of + a sequence object for the name parameter. - This method may not return a meaningful/consistent result across different PDO - drivers, because the underlying database may not even support the notion - of auto-increment fields or sequences. + This method may not return a meaningful or consistent result across + different PDO drivers, because the underlying database may not even + support the notion of auto-increment fields or sequences. diff --git a/reference/pdo/functions/PDO-query.xml b/reference/pdo/functions/PDO-query.xml index 47fbda217f..27272be1b8 100644 --- a/reference/pdo/functions/PDO-query.xml +++ b/reference/pdo/functions/PDO-query.xml @@ -1,5 +1,5 @@ - + @@ -26,6 +26,13 @@ PDO::prepare and issue the statement with multiple calls to PDOStatement::execute. + + If you do not fetch all of the data in a result set before issuing your + next call to PDO::query, your call may fail. Call + PDOStatement::closeCursor to release the database + resources associated with the PDOStatement object before issuing your + next call to PDO::query. + diff --git a/reference/pdo/functions/PDOStatement-fetch.xml b/reference/pdo/functions/PDOStatement-fetch.xml index 40119d13b3..3d0760785e 100644 --- a/reference/pdo/functions/PDOStatement-fetch.xml +++ b/reference/pdo/functions/PDOStatement-fetch.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,9 @@ - Fetches a row from a result set associated with a PDOStatement object. + Fetches a row from a result set associated with a PDOStatement object. The + fetch_style parameter determines how PDO returns + the row. @@ -40,7 +42,8 @@ PDO::FETCH_BOTH (default): returns an array indexed by - both column name and column number as returned in your result set + both column name and 0-indexed column number as returned in your + result set PDO::FETCH_BOUND: returns &true; and assigns the @@ -48,20 +51,30 @@ they were bound with the PDOStatement::bindParam method + + PDO::FETCH_CLASS: returns a new instance of the + requested class, mapping the columns of the result set to named + properties in the class + + + PDO::FETCH_INTO: updates an existing instance + of the requested class, mapping the columns of the result set to + named properties in the class + PDO::FETCH_LAZY: combines PDO::FETCH_BOTH and PDO::FETCH_OBJ, creating the object variable names as they are accessed + + PDO::FETCH_NUM: returns an array indexed by column + number as returned in your result set, starting at column 0 + PDO::FETCH_OBJ: returns an anonymous object with property names that correspond to the column names returned in your result set - - PDO::FETCH_NUM: returns an array indexed by column - number as returned in your result set, starting at column 0 - @@ -73,7 +86,11 @@ For a PDOStatement object representing a scrollable cursor, this value determines which row will be returned to the caller. This value must be one of the PDO::FETCH_ORI_* constants, - defaulting to PDO::FETCH_ORI_NEXT. + defaulting to PDO::FETCH_ORI_NEXT. To request a + scrollable cursor for your PDOStatement object, you must set the + PDO::ATTR_CURSOR attribute to + PDO::CURSOR_SCROLL when you prepare the SQL + statement with PDO::prepare. diff --git a/reference/pdo/functions/PDOStatement-fetchAll.xml b/reference/pdo/functions/PDOStatement-fetchAll.xml index ee9fb6f4ce..919c460e99 100644 --- a/reference/pdo/functions/PDOStatement-fetchAll.xml +++ b/reference/pdo/functions/PDOStatement-fetchAll.xml @@ -1,5 +1,5 @@ - + @@ -32,7 +32,9 @@ To return an array consisting of all values of a single column from - the result set, specify PDO::FETCH_COLUMN. + the result set, specify PDO::FETCH_COLUMN. You + can specify which column you want with the + column-index parameter. To fetch only the unique values of a single column from the result set,