Changeset 8942 for trunk/MagicSoft/Mars/msql
- Timestamp:
- 06/12/08 16:02:55 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/msql
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msql/MSQLMagic.cc
r8709 r8942 217 217 // In Dummy mode no query is send an -1 is returned. 218 218 // 219 Int_t MSQLMagic::Insert(const char *table, const char *vars )219 Int_t MSQLMagic::Insert(const char *table, const char *vars, const char *where) 220 220 { 221 221 // Build query … … 224 224 query += " SET "; 225 225 query += vars; 226 if (!TString(where).IsNull()) 227 { 228 query += ", "; 229 query += where; 230 } 226 231 227 232 // Check for dummy mode … … 286 291 return ExistStr(col, table, val) ? 287 292 Update(table, vars, Form("%s=%s", col, val)) : 288 Insert(table, vars );293 Insert(table, vars, Form("%s=%s", col, val)); 289 294 } 290 295 -
trunk/MagicSoft/Mars/msql/MSQLMagic.h
r8589 r8942 46 46 Bool_t ExistStr(const char *column, const char *table, const char *test); 47 47 48 Int_t Insert(const char *table, const char *vars );48 Int_t Insert(const char *table, const char *vars, const char *where=0); 49 49 Int_t Update(const char *table, const char *vars, const char *where); 50 50 Int_t Delete(const char *table, const char *where);
Note:
See TracChangeset
for help on using the changeset viewer.