You are here: $result = $stmnt->fetchAll(); returning duplicate keys for a single query « PHP Programming Language « IT news, forums, messages
$result = $stmnt->fetchAll(); returning duplicate keys for a single query

Posted by Rowan on 01/11/08 18:21

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();


<====krumo array dump===>
0 (Array, 12 elements)

*
id (Integer) 8
*
0 (Integer) 8
*
name_first (String, 8 characters ) Martinez
*
1 (String, 8 characters ) Martinez
*
name_last (String, 10 characters ) Conc*****
*
2 (String, 10 characters ) Con******
*
personal_street (String, 20 characters ) *****W. Buckthorn
*
3 (String, 20 characters ) ****W. Buckthorn
</===============>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация