I have a table as such where mid is my auto increment primary key:
TABLE: mboard
mid
2
3
4
5
I'm doing this in combination with PHP4.
What I want to do is build a query that will allow me to get the largest mid
from the table (mboard) above.
The query I have is: select max(mid) from mboard;
BUT I tried the following in PHP and it doesn't work:
$myquery = "SELECT max(mid) FROM mboard";
$myresult = mysql_query($myquery);
$row = mysql_fetch_object($myresult);
print "$row->mid is result";
Any ideas on how to do this?
Mike
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php