note 97220 added to pdostatement.fetchall
| From: | sikuneh at osu1 dot php dot net | Date: | Thu, 08 Apr 2010 19:10:51 +0000 |
| Subject: | note 97220 added to pdostatement.fetchall | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168040@lists.php.net to get a copy of this message | ||
A question:
If you use $var->fetchAll() how would you get each column value.
Bassically, I'm asking how one would get the equivelent of
while($row=$preparedSQLStatement->fetch())
$col1 = $row['1'];
...
Would you just define it as:
$column1 = $var[0];
$column2 = $var[1];
and echo so you could change the way it shows on the page?
echo "<p>".$column1;
echo "<br /><h4>".$column2k
Or would this not be the right statement for that function?
----
Server IP: 64.71.164.2
Probable Submitter: 152.157.208.140
----
Manual Page -- http://www.php.net/manual/en/pdostatement.fetchall.php
Edit -- https://master.php.net/note/edit/97220
Del: integrated -- https://master.php.net/note/delete/97220/integrated
Del: useless -- https://master.php.net/note/delete/97220/useless
Del: bad code -- https://master.php.net/note/delete/97220/bad+code
Del: spam -- https://master.php.net/note/delete/97220/spam
Del: non-english -- https://master.php.net/note/delete/97220/non-english
Del: in docs -- https://master.php.net/note/delete/97220/in+docs
Del: other reasons-- https://master.php.net/note/delete/97220
Reject -- https://master.php.net/note/reject/97220
Search -- https://master.php.net/manage/user-notes.php