Database: Difference between revisions

m
Code tabbing fixes
(Added a few examples of various database functions, and clarified some of the database function arguments.)
m (Code tabbing fixes)
Line 168: Line 168:
script "ShowMostDeaths" (void)
script "ShowMostDeaths" (void)
{
{
int result = GetDBEntries("Deaths");
    int result = GetDBEntries("Deaths");
     int count = CountDBResults(result);
     int count = CountDBResults(result);
      
      
     // Make sure the database has values
     // Make sure the database has values
     if (count != 0)
     if (count != 0)
{
    {
         // Free the memory allocated by the first GetDBEntries call
         // Free the memory allocated by the first GetDBEntries call
         FreeDBResults(result);  
         FreeDBResults(result);