On Wed, February 14, 2007 11:34 am, Bill Guion wrote:
> At 6:22 PM -0600 2/13/07, Richard Lynch wrote:
>
>>
>>The most efficient way is "Don't do that." :-)
>>
>>Simply loop through the results and do whatever you want to do with
>>them, and don't put them into an array at all.
>>
>>This question h
On Tue, February 13, 2007 8:22 pm, Robert Cummings wrote:
> On Tue, 2007-02-13 at 18:22 -0600, Richard Lynch wrote:
>> #2
>> loop through mysql result set to build $array
>> perform some kind of calculation upon $array
>>
>> In this case, it's USUALLY much more efficient to write an SQL query
>> to
> > How about scenario #3: I wish to output my data in (for example)
> > three columns, as a phone book does. To make the example simple,
> > assume 15 data points. I wish the output to look like
> >
> > 1 611
> > 2 712
> > 3 813
> > 4 914
> >
Bill Guion wrote:
> At 6:22 PM -0600 2/13/07, Richard Lynch wrote:
>
>>
>> The most efficient way is "Don't do that." :-)
>>
>> Simply loop through the results and do whatever you want to do with
>> them, and don't put them into an array at all.
>>
>> This question has appeared before, and usually
> -Original Message-
> From: Bill Guion [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 14, 2007 12:35 PM
> To: PHP-General
> Subject: Re: [PHP] Getting mysql_query results into an array
>
> At 6:22 PM -0600 2/13/07, Richard Lynch wrote:
>
> >
> >
At 6:22 PM -0600 2/13/07, Richard Lynch wrote:
The most efficient way is "Don't do that." :-)
Simply loop through the results and do whatever you want to do with
them, and don't put them into an array at all.
This question has appeared before, and usually breaks down to one of
these scenarios
On Tue, 2007-02-13 at 18:22 -0600, Richard Lynch wrote:
> #2
> loop through mysql result set to build $array
> perform some kind of calculation upon $array
>
> In this case, it's USUALLY much more efficient to write an SQL query
> to perform the calculation.
>
> Databases are highly optimized for
# [EMAIL PROTECTED] / 2007-02-13 17:43:10 -0700:
> Richard Lynch wrote:
> >The most efficient way is "Don't do that." :-)
> >
> >Simply loop through the results and do whatever you want to do with
> >them, and don't put them into an array at all.
>
> This makes perfect sense.
>
> However, I am cu
Richard Lynch wrote:
The most efficient way is "Don't do that." :-)
Simply loop through the results and do whatever you want to do with
them, and don't put them into an array at all.
This makes perfect sense.
However, I am currently writing an abstraction
layer for a project that will later
On Tue, February 13, 2007 5:34 pm, Skip Evans wrote:
> I read on php.net about resources, the type
> returned from mysql_query(), and was trying locate
> the best way to get the result set back from a
> query into an array.
>
> Is simply looping through the result set with
> mysql_fetch_assoc() the
10 matches
Mail list logo