IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2006, 7:26:49 PM (20 years ago)
Author:
jhoblitt
Message:

updated -pending

File:
1 edited

Legend:

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

    r8286 r8288  
    110110    PS_ASSERT_PTR_NON_NULL(config, NULL);
    111111
    112      char *query = "SELECT rawDetrendExp.* FROM rawDetrendExp"
     112     psString query = psStringCopy("SELECT rawDetrendExp.* FROM rawDetrendExp"
    113113        " LEFT JOIN detInputExp ON rawDetrendExp.exp_id = detInputExp.exp_id"
    114         " WHERE detInputExp.exp_id IS NULL";
     114        " WHERE detInputExp.exp_id IS NULL");
     115
     116    if (config->where) {
     117        psString whereClaus = psDBGenerateWhereConditionSQL(config->where);
     118        psStringAppend(&query, " AND %s", whereClaus);
     119        psFree(whereClaus);
     120    }
    115121
    116122    if (!p_psDBRunQuery(config->dbh, query)) {
    117123        psError(PS_ERR_UNKNOWN, false, "database error");
     124        psFree(query);
    118125        return false;
    119126    }
     127    psFree(query);
    120128
    121129    psArray *output = p_psDBFetchResult(config->dbh);
Note: See TracChangeset for help on using the changeset viewer.