Mr. Furxheir, R.M.W. Group: admins (1791 posts total) (last post: November 24, 2007 - 15:07) Citizen #20: Martí- Paìr Furxhéir | I have written a new function for the DB API, DisplayCitizensList :
//////////////////////////////////////////////////////////////////////////////
// This function displays a list of citizens from the MYSQL result set, as
// well as a sort header.
//
// The Summary String is displayed at the bottom, with the number of active
// citizens in the set.
//
// $ExtraQuery is added in the sort header.
//
function DisplayCitizensList ( $result, $SummaryString, $ExtraQuery ="")
To Display a list of all citizens, only 2 PHP lines are now need :
$result = $DB->exec_SELECTquery( "*", "Citizens", '', '', $sort );
DisplayCitizensList ( $result, "Number of Active Citizens:" );
( provided the following line was added at the top : include("talossa_db.php"); )
As such, the citizens.php page is now much more simplier !
terrorism, terrorism, the roof is on fire !
|