[PHP] php mysql array question

2003-07-11 Thread Larry Brown
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.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php mysql array question

2003-07-11 Thread CPT John W. Holmes
 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...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php mysql array question

2003-07-11 Thread Philip Olson
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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php