Changeset 8942 for trunk


Ignore:
Timestamp:
06/12/08 16:02:55 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8941 r8942  
    8989     - the number of events in format version V9 seems to be
    9090       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
    9195
    9296
  • trunk/MagicSoft/Mars/NEWS

    r8941 r8942  
    7171   * Implemented cc file version 2008-20-02/0
    7272
    73    * Added Pyroemeter information to output (stored in a new Tree
     73   * Added Pyrometer information to output (stored in a new Tree
    7474     Pyrometer, needs a complete new merpp, i.e. new calibration)
    7575
  • trunk/MagicSoft/Mars/msql/MSQLMagic.cc

    r8709 r8942  
    217217// In Dummy mode no query is send an -1 is returned.
    218218//
    219 Int_t MSQLMagic::Insert(const char *table, const char *vars)
     219Int_t MSQLMagic::Insert(const char *table, const char *vars, const char *where)
    220220{
    221221    // Build query
     
    224224    query += " SET ";
    225225    query += vars;
     226    if (!TString(where).IsNull())
     227    {
     228        query += ", ";
     229        query += where;
     230    }
    226231
    227232    // Check for dummy mode
     
    286291    return ExistStr(col, table, val) ?
    287292        Update(table, vars, Form("%s=%s", col, val)) :
    288         Insert(table, vars);
     293        Insert(table, vars, Form("%s=%s", col, val));
    289294}
    290295
  • trunk/MagicSoft/Mars/msql/MSQLMagic.h

    r8589 r8942  
    4646    Bool_t  ExistStr(const char *column, const char *table, const char *test);
    4747
    48     Int_t Insert(const char *table, const char *vars);
     48    Int_t Insert(const char *table, const char *vars, const char *where=0);
    4949    Int_t Update(const char *table, const char *vars, const char *where);
    5050    Int_t Delete(const char *table, const char *where);
Note: See TracChangeset for help on using the changeset viewer.