Hello
$sql="SELECT MAX(`id`) FROM `users` WHERE `energy`=0"; $result=mysql_query($sql) or die(mysql_error()); while ($obj = mysql_fetch_object($result)) { print_r($obj); print_r($obj->MAX('id')); echo '<br>'; $obj->MAX('id'); } stdClass Object ( [MAX(`id`)] => 110 )
Fatal error: Call to undefined method stdClass :: MAX () in Z: \ home \ localhost \ www \ bd.php on line 18
How to be? It was possible to use mysql_fetch_array () and select 1 element of the array.