IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 22, 2010, 1:58:02 PM (16 years ago)
Author:
bills
Message:

changes to support updating only a subset of the components of a run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/warptool.c

    r27389 r27391  
    402402    }
    403403
    404     psString query = psStringCopy("UPDATE warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)");
     404    psString query = psStringCopy("UPDATE warpRun JOIN warpSkyfile USING(warp_id) JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)");
    405405
    406406    // pxUpdateRun gets parameters from config->args and updates
    407     bool result = pxUpdateRun(config, where, &query, "warpRun", true);
     407    bool result = pxUpdateRun(config, where, &query, "warpRun", "warp_id", "warpSkyfile", true);
    408408
    409409    psFree(query);
     
    907907    }
    908908
     909    psString whereStr = psStringCopy("");
    909910    if (psListLength(where->list)) {
    910911        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    911         psStringAppend(&query, " AND %s", whereClause);
     912        psStringAppend(&whereStr, "\n AND %s", whereClause);
    912913        psFree(whereClause);
    913914    }
     
    921922    }
    922923
    923     if (!p_psDBRunQuery(config->dbh, query)) {
     924    if (!p_psDBRunQueryF(config->dbh, query, whereStr, whereStr)) {
    924925        psError(PS_ERR_UNKNOWN, false, "database error");
    925926        psFree(query);
    926927        return false;
    927928    }
     929    psFree(whereStr);
    928930    psFree(query);
    929931
Note: See TracChangeset for help on using the changeset viewer.