On my briefing page I have the following code which gives me aircraft's name from schedules:
 
<?php echo "{$schedule->aircraft}"; ?>
	Which outputs something like this: A320-214
 
	I can also use:
 
<?php echo "{$schedule->aircraftid}"; ?>
	Which gives me an ID of an aircraft from *aircraft* table.
 
	 
 
	Knowing aircraft's name and id, how can I get aircraft icao code from *aircraft* database?
 
	(In aircraft database there are fields *id*, *icao*, *name* etc)
 
	Thanks!