function GetWeatherByID($arg) { if (!is_numeric($arg)) { return FALSE; } $db = new Db(); $WeatherID = $db->quote($arg); $results = $db->select("SELECT * from Weather where WeatherID = {$WeatherID} limit 1"); if ($results) { $weather = new weather(); foreach ($results as $result) { $weather->hydrate($result); } return $weather; } else { return $results; } }