Posted by bobkaku on 09/19/05 00:08
I don't understand how I can fetch the result for an aggregate SQL
function. I have a query written like this:
$query = "select max(qno) from answers";
$result = mysql_query($query);
$maxqno = mysql_result($result);
$nextqno = $result + 1;
I initially tried to use the row$ = mysql_fetch_array($result)
function. But, my result isn't an element in an array, corresponding
to a table column in the database. I just simply want to get the
maximum value of "qno" from the table. How do I do it?
Thanks in advance.
Navigation:
[Reply to this message]
|