Changeset 15634


Ignore:
Timestamp:
2008-05-22T13:54:32+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Adding quick implementation of exists().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/lib/sqliteclass.cpp

    r15633 r15634  
    111111bool sqliteclass::exists(const text_t& key)
    112112{
    113   // !! TO IMPLEMENT
    114   return false;
     113  text_t sql_cmd = "SELECT value FROM data WHERE key='" + key + "'";
     114  vector<text_tmap> sql_results;
     115  if (sqlitefile == NULL || !sqlgetarray(sql_cmd, sql_results) || sql_results.size() == 0)
     116  {
     117    return false;
     118  }
     119
     120  return true;
    115121}
    116122
Note: See TracChangeset for help on using the changeset viewer.