You are here: Re: Query returning array « PHP Programming Language « IT news, forums, messages
Re: Query returning array

Posted by Karl Groves on 04/20/07 14:22

Jerry Stuckle <jstucklex@attglobal.net> wrote in
news:PqKdnRkTdej3XLXbnZ2dnUVZ_gOdnZ2d@comcast.com:


>
> I guess I don't understand exactly what you want.

Why not? I've done such a bangup job of explaining it. ;-)

> You're returning two columns from your SELECT statement - 'foo' and
> 'bar'. To place them in one variable you need an array.
>
> Now - you're returning multiple instances of that first array
> (multiple rows), so you need a multidimensional array to retrieve all
> the data.
>

Damn!
That's where my problem was. I was totally backwards in my understanding of
how to deal with the results. Each row is an array, and the function is
returning an array of those arrays.

OK, I only feel a tad bit retarded now.
My issue was expecting the function would return a single dimension array.
Sorry everyone.



--
Karl Groves

 

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

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