Hello i made this query for wordpress plugin
$anyOne = $wpdb->get_results("SELECT MAX(id) as idlastest FROM " . $table_name_for_select . " WHERE drJlDate='".$dkdrbooking_for_compare."'");
$anyOne
Array ( [0] => stdClass Object ( [idlastest] => 32 ) )
idlastest
echo 'lastestID is : '.$myIds[0]['idlastest'];
This is an object in your array, so use ->
to get object value
echo 'lastestID is : '.$myIds[0]->idlastest;