Re: [PHP] php mysql array question

Posted: 07-11-2003, 03:11 PM
> Is there any php function to pull a query into an array? I know there is
a
> way to get the first row of the results in an array, but I'm having to
loop
> through each row pushing the row onto an array to get the result I'm
looking
> for and it seems like a lot of code for something that I would think is
used
> a lot.
There's no PHP function to do so. Some abastraction layers provide this, but
it's just doing a loop like you're doing.

Show your code and we can offer tips on how to improve performance.

---John Holmes...

Reply With Quote

Responses to "Re: [PHP] php mysql array question"

Philip Olson
Guest
Posts: n/a
 
Re: [PHP] php mysql array question
Posted: 07-11-2003, 03:25 PM
On Fri, 11 Jul 2003, CPT John W. Holmes wrote:
> > Is there any php function to pull a query into an array? I know there is
> a
> > way to get the first row of the results in an array, but I'm having to
> loop
> > through each row pushing the row onto an array to get the result I'm
> looking
> > for and it seems like a lot of code for something that I would think is
> used
> > a lot.
>
> There's no PHP function to do so. Some abastraction layers provide this, but
> it's just doing a loop like you're doing.
>
> Show your code and we can offer tips on how to improve performance.
I'm glad this feature doesn't exist. Just think how abused it would
be, how many people would use it, when few would actually need it.
Most people can use the data while in the loop, not after. Or do
what is needed in the sql, not php. Maybe I'm a little too parental
though, but so be it. :)

Regards,
Philip

Reply With Quote
 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Array output question Hydrowizard Coldfusion - Getting Started 3 03-07-2005 12:35 PM
Array question webhead_1 Coldfusion - Getting Started 31 11-23-2003 03:26 PM
newbie array question Harry Wiens PHP Development 11 11-11-2003 11:08 PM
MySQL Table Question > Array? Sixii PHP Development 2 10-05-2003 09:50 PM
note 33659 added to function.mysql-fetch-array Markus@rack1.php.net PHP Notes 0 07-03-2003 10:36 AM