- Timestamp:
- 06/12/08 16:02:55 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8941 r8942 89 89 - the number of events in format version V9 seems to be 90 90 to high by one. We correct for this. 91 92 * msql/MSQLMagic.[h,cc]: 93 - fixed InsertUpdate. The primary key was not inserted 94 if Insert was called 91 95 92 96 -
trunk/MagicSoft/Mars/NEWS
r8941 r8942 71 71 * Implemented cc file version 2008-20-02/0 72 72 73 * Added Pyro emeter information to output (stored in a new Tree73 * Added Pyrometer information to output (stored in a new Tree 74 74 Pyrometer, needs a complete new merpp, i.e. new calibration) 75 75 -
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.