Changeset 8589


Ignore:
Timestamp:
06/20/07 17:07:36 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8588 r8589  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/06/20 Thomas Bretz
     22
     23   * msql/MSQLMagic.[h,cc]:
     24     - added a new function InsertUpdate
     25
     26
    2027
    2128 2007/06/20 Daniela Dorner
  • trunk/MagicSoft/Mars/msql/MSQLMagic.cc

    r8061 r8589  
    268268// --------------------------------------------------------------------------
    269269//
     270// An abbreviation for checking the existance with ExistStr and
     271// calling insert or update respectively.
     272//
     273Int_t MSQLMagic::InsertUpdate(const char *table, const char *col, const char *val, const char *vars)
     274{
     275    return ExistStr(col, table, val) ?
     276        Update(table, vars, Form("%s=%s", col, val)) :
     277        Insert(table, vars);
     278}
     279
     280// --------------------------------------------------------------------------
     281//
    270282// An abbreviation for a Dalete-Query.
    271283//
  • trunk/MagicSoft/Mars/msql/MSQLMagic.h

    r8061 r8589  
    4949    Int_t Update(const char *table, const char *vars, const char *where);
    5050    Int_t Delete(const char *table, const char *where);
     51    Int_t InsertUpdate(const char *table, const char *col, const char *val, const char *vars);
    5152
    5253    void Delete(const Option_t *o) { TObject::Delete(o); }
Note: See TracChangeset for help on using the changeset viewer.