ryanf Posted April 15, 2005 Share Posted April 15, 2005 Hey I am trying to get the max id from a table. I know the query works as I tried it in phpmyadmin and got the right answer but I dont know how to get the result from the query. here is the code $sql = "select MAX(ethogram_id) as count from " . TABLE_ETHOGRAMS; $max = tep_db_query($sql); echo 'Max: ' . $max . '<br />'; echo 'Max: ' . $max['count'] . '<br />'; The first echo prints out Resource id#11 the second echo doesn't print out anything. What is the current syntax to get the result count from the query? Thanks If I was crafty, this would be a funny signature. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.