Re: PDO ?
| From: | Kapu® | Date: | Tue, 15 Jan 2013 18:52:03 +0000 |
| Subject: | Re: PDO ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48649@lists.php.net to get a copy of this message | ||
On 15. 1. 2013 18:25, Jim Giner wrote:
Doing some conversion - looking for a solution. Currently I do something like this: while (list($var1,$var2) = mysql_fetch_array($qrslts)) { handle the vars.... } Is there something in the PDO functions that emulates this same ability? Some of my uses of the sql syntax have many more vars and I'm trying to avoid having to move the fetch-ed fields one at a time to vars that I wish to use. I already tried: list($var1,$var2) = $qrslts->fetch(PDO::FETCH_ASSOC); this does not populate the vars. Hi,using PDO::FETCH_NUM instead PDO::FETCH_ASSOC should do the job. Kapu