Changeset 15633 for gsdl/trunk/lib/sqliteclass.cpp
- Timestamp:
- 2008-05-22T13:48:55+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/lib/sqliteclass.cpp
r15632 r15633 58 58 delete[] filename_cstr; 59 59 60 if (sqlitefile == NULL && logout != NULL)60 if (sqlitefile == NULL) 61 61 { 62 62 outconvertclass text_t2ascii; 63 63 (*logout) << text_t2ascii << "database open failed on: " << filename << "\n"; 64 } 65 66 if (sqlitefile != NULL && mode == DB_WRITER_CREATE) 64 return false; 65 } 66 67 if (mode == DB_WRITER_CREATE) 67 68 { 68 69 sqlexec("CREATE TABLE data (key TEXT, value TEXT, PRIMARY KEY(key))"); 69 70 } 70 71 71 return (sqlitefile != NULL);72 return true; 72 73 } 73 74 … … 187 188 188 189 189 void sqliteclass::deletekey(const text_t &key) 190 { 191 if (sqlitefile == NULL) return; 192 193 // !! TO IMPLEMENT 190 void sqliteclass::deletekey (const text_t &key) 191 { 192 text_t sql_cmd = "DELETE FROM data WHERE key='" + key + "'"; 193 sqlexec(sql_cmd); 194 194 } 195 195
Note:
See TracChangeset
for help on using the changeset viewer.