[Talossa.com portal]
[Citizens Toolbox]
[Immigration]
No Running elections
New function of the API : DisplayCitizensList(#24), posted by Mr. Furxheir, R.M.W., [IP Hidden], November 23, 2004 - 09:13. Viewed 1004 times.
User InfoText
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 !





Reply to this post | Back to the forum | Forums Overview| Activate Thread View
Forums Overview | Login | Register | Lost your password? Cyphor (Release: 0.19, PHP 5.2.5)