when I run the method:
public function latest_idf() {
global $database;
$sql = "SELECT FROM ".self::$table_name;
$result_id=($database->query($sql));
return ($result_id);
}
the variable $result_id
returns resource (11) of type ("mysql result")
or Resource id #5
which I need to parse to integer for max id number, how can I return the $result_id
as a number integer ?
Resource id #5
it is not my max row.
I have 6 row and in my table.
Did max(id)
is beginning from 0 to 5 ?