Re: [PHP] Using the AS key word in SQL Queries

2002-07-02 Thread Richard Lynch
>On Tue, Jul 02, 2002 at 11:08:13AM +0530, Sachin Keshavan wrote: >> >> I am trying to execute the Query >> SELECT MAX(RECORDNO) AS MAXREC FROM BOOKS; >> >> while($row = mysql_fetch_array($sql_result)) >> { >> $bookID = $row['MAXREC']; >> } >> >> This query fails. Am I doing any thing wrong h

Re: [PHP] Using the AS key word in SQL Queries

2002-07-01 Thread Analysis & Solutions
On Tue, Jul 02, 2002 at 11:08:13AM +0530, Sachin Keshavan wrote: > > I am trying to execute the Query > SELECT MAX(RECORDNO) AS MAXREC FROM BOOKS; > > while($row = mysql_fetch_array($sql_result)) > { >$bookID = $row['MAXREC']; > } > > This query fails. Am I doing any thing wrong here.

[PHP] Using the AS key word in SQL Queries

2002-07-01 Thread Sachin Keshavan
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. -- PHP Gene