RE: [PHP] accessing a mysql column by number
| From: | Rick Emery | Date: | Wed, 27 Mar 2002 16:59:17 +0000 |
| Subject: | RE: [PHP] accessing a mysql column by number | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90384@lists.php.net to get a copy of this message | ||
$row = mysql_fetch_row($result);
$val1 = $row[0];
$val2= $row[1];
$val3 = $row[2];
-----Original Message-----
From: Phil Schwarzmann [mailto:pschwar@jhmi.edu]
Sent: Wednesday, March 27, 2002 10:51 AM
To: php-general@lists.php.net
Subject: [PHP] accessing a mysql column by number
Is there a way to access a column in Mysql just by using a number?
Like if you had three columns called "column1", "column2", and
"column3" and I wanted to access column3 just by using the number 3
Thanks!
Phil