moeschkieto Posted November 14, 2009 Share Posted November 14, 2009 hello i am trying to let a page show some data out of a database. this is how it schould look but i can't get it to work here are the code's that i got $allaircraft = OperationsData::GetAllAircraft(); echo '<table>'; foreach ($allaircraft as $aircraft) { echo '<tr>'; echo '<td>'; // do each row echo '</td></tr>'; } echo '</table>'; and the folowing public static function GetAllAircraft($onlyenabled=false) { $sql = 'SELECT * FROM ' . TABLE_PREFIX .'aircraft'; if($onlyenabled == true) { $sql .= ' WHERE `enabled`=1 '; } $sql .= ' ORDER BY icao ASC'; return DB::get_results($sql); } on this website you can see whate i mean http://www.newenglandvirtual.com/index.php/Operations/fleet Link to comment https://forums.phpfreaks.com/topic/181550-need-help-on-coding-some-php-to-acces-database/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.