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.
Don't ask us. Ask MySQL. After running the query (I assume you ARE
running the query, via mysql_query(), right?) throw in an echo call to
mysql_error(). That'll tell you what went wrong:
http://www.php.net/manual/en/function.mysql-error.php
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php