FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » MAX(id)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
MAX(id) [message #177254] Thu, 01 March 2012 18:30 Go to previous message
cerr is currently offline  cerr
Messages: 33
Registered: September 2010
Karma:
Member
Hi,

I have a query to figure out the max ID in a table. The code looks
like this:
$subquery = "SELECT MAX(id) FROM `xymply_markers`";
if (!$subresult = mysql_query($query)){
die('Error: ' . mysql_error());
}
if($max = mysql_fetch_array($subresult)){
var_dump($max);
}
Now this query gives me a nice result in phpMyAdmin but here I get a
sh*tload of data from my var_dump(), why is that?
How do I correctly read out the highest id number?
Thank you!
Ron
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: javascript, XmlHttpRequest, PHP, and daemon
Next Topic: Name of page itself?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 21:20:35 GMT 2024

Total time taken to generate the page: 0.04854 seconds