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

Legend:

Unmodified
Added
Removed
  • 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.