|
Posted by Rowan on 01/11/08 18:57
On Jan 11, 10:21 am, Rowan <yaard...@gmail.com> wrote:
> For some reason when I do a fetchall on a PDO query the array returned
> has duplicated keys. see below.
>
> SELECT name_first, name_last, personal_street, personal_phone_home,
> personal_phone_cell FROM contacts WHERE id = 8;
> $result = $stmnt->fetchAll();
>
Helps when you read. For anyone curious the answer is below.
Controls how the next row will be returned to the caller. This value
must be one of the PDO::FETCH_* constants, defaulting to
PDO::FETCH_BOTH.
*
PDO::FETCH_ASSOC: returns an array indexed by column name as
returned in your result set
*
PDO::FETCH_BOTH (default): returns an array indexed by both
column name and 0-indexed column number as returned in your result set
Navigation:
[Reply to this message]
|