AM I missing something? I have
public static function TotalHoursBetweenDates($icao, $startdate, $enddate) { //Count total hours
$query = "SELECT SUM(flighttime) as hours FROM phpvms_pireps WHERE depicao = '$icao' OR arricao = '$icao' AND DATE(submitdate) >= '$startdate' AND DATE(submitdate) <= '$enddate'";
$result = DB::get_row($query);
return $result->hours;
}
in my HubStats.class
and this on my frontpage_main.php
<?php echo HubStats::TotalHoursBetweenDates('PANC', date("Y-m-01"), date("Y-m-t"));?>
Still getting a blank return.
Any help would be appreciated!