You are here: Re: Problem iterating thru associative array created by using SQL query. « PHP Programming Language « IT news, forums, messages
Re: Problem iterating thru associative array created by using SQL query.

Posted by Carl on 03/09/06 00:31

Pelin,

Try changing the line
$orders = $db->query($sql);
to :
$orders = $db->query($sql, PDO::FETCH_ASSOC);

I don't know why that option is not shown on the php.net docs for PDO,
but it does infact work for me (php 5.1.2)

More info can be found here:
http://wiki.cc/php/PDO_Basics#Query_a_table

Hope that helps,
Carl.

 

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

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