I’m working one of the new features for WorldACARS that pulls aircraft data from the database, displays it, gets processed by WorldACARS then displays it to the user.
For some reason the code I wrote doesn’t work:
(It pulls data from url, e.g http://localhost/action.php/wacars/maintence?reg=VH-FTW)
public function maintence()
{
$reg = $_GET['reg'];
$aicraft = self::getAircraftInfo($reg);
echo "$aicraft->totaltime";
}
public static function getAircraftInfo($reg)
{
$reg = DB::escape($reg);
return DB::get_row('SELECT * FROM '.TABLE_PREFIX.'aircraft
WHERE `registration`='.$reg);
}
Could someone please tell me whats wrong with it?
Thanks,
Mitch