FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » transfering all MySQL rows to an array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: transfering all MySQL rows to an array [message #176526 is a reply to message #176480] Mon, 09 January 2012 01:02 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
M. Strobel wrote:

> Am 08.01.2012 11:31, schrieb Thomas 'PointedEars' Lahn:
>> Denis McMahon wrote:
>>> On Sat, 07 Jan 2012 15:03:45 -0500, bill wrote:
>>>> Yes, I know I can do it using a while statement, but is there a PHP
>>>> mysql function to move all the data obtained in a query to an array
>>>> that can be returned from a user written function in one statement ?
>>>
>>> If you're using the improved mysql interface (mysqli) I believe there's
>>> a function you can call on the result .... can't remember the name, but
>>> if you check the mysqli result documentation on the php documentation
>>> website it should be there.
>>
>> It's mysqli_result::fetch_all(), of course. But PDO also has that
>> feature (PDOStatement::fetchAll()).
>>
>>> I have a vague recollection that the availability of said function might
>>> refer on some php / mysql configuration options as well, or possibly
>>> build switches.
>>
>> Posting your beliefs and vague ideas is helping nobody. If you are not
>> sure at all, simply do not post. We do not depend on you saving the
>> world alone.
>
> Same to you. Pedants do not make a good helper.

I have posted a helpful and correct answer. And you?


Score adjusted

PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(at)news(dot)demon(dot)co(dot)uk> (2004)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sessions timeout
Next Topic: scoping inside a block
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 11:22:33 GMT 2024

Total time taken to generate the page: 0.04978 seconds