You are here: mysql_fetch for aggregate SQL function « PHP Programming Language « IT news, forums, messages
mysql_fetch for aggregate SQL function

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация