Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php Subject: Re: transfering all MySQL rows to an array Date: Sun, 08 Jan 2012 15:02:11 +0100 Lines: 29 Message-ID: <9mtlv3Fhk7U2@mid.uni-berlin.de> References: <4f09644a$0$30312$a8266bb1@newsreader.readnews.com> <1932548.aqSPkdTlGX@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Cka1I+Bh6bebxaa1gShOSQhvcbcJVQ2R+9f/d0YrAcTTrjONU= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.24) Gecko/20111101 SUSE/3.1.16 Lightning/1.0b2 Thunderbird/3.1.16 In-Reply-To: <1932548.aqSPkdTlGX@PointedEars.de> Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4287 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. > > > PointedEars