Reputation: 21
how can I echo the 33 form this printed array directly?
Array ( [0] => stdClass Object ( [max(renr)] => 333 ) )
Thanks
Upvotes: 0
Views: 222
Reputation: 318758
Use an alias in your SQL query so you have an alphanumeric column name in the result set. That's the only real solution.
SELECT MAX(renr) AS max_renr FROM ....
and then $arr[0]->max_renr
in your php code.
Upvotes: 0
Reputation: 16788
Well that's gonna depend on your language, but assuming PHP from the look of it...
$arr[0]->max(renr)
But to be far, I don't know what an index of max(renr) means
Upvotes: 0