Using the AS key word in SQL Queries
| From: | Sachin Keshavan | Date: | Tue, 02 Jul 2002 05:38:13 +0000 |
| Subject: | Using the AS key word in SQL Queries | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104843@lists.php.net to get a copy of this message | ||
Hello all,
I am trying to execute the Query
SELECT MAX(RECORDNO) AS MAXREC FROM BOOKS;
I am trying to access the value like this
while($row = mysql_fetch_array($sql_result))
{
$bookID = $row['MAXREC'];
}
This query fails. Am I doing any thing wrong here.
Thanks,
Sachin.