IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 25, 2013, 4:05:32 PM (13 years ago)
Author:
watersc1
Message:

Better blocking in stack summary stage

File:
1 edited

Legend:

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

    r34800 r35856  
    14751475  // generate where strings for arguments that require extra processing
    14761476  // beyond PXOPT_COPY*
     1477  psString whereClause;
    14771478  if (psListLength(where->list)) {
    1478     psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    1479     psStringAppend(&query, " AND %s", whereClause);
    1480     psFree(whereClause);
     1479    whereClause = psDBGenerateWhereConditionSQL(where, NULL);
     1480    psStringPrepend(&whereClause, "\n AND ");
    14811481  } else if (!all) {
    14821482    psError(PXTOOLS_ERR_CONFIG, true, "search parameters or -all are required");
     1483    psFree(whereClause);
    14831484    return false;
    14841485  }
     
    14931494  }
    14941495
    1495   if (!p_psDBRunQuery(config->dbh, query)) {
     1496  if (!p_psDBRunQueryF(config->dbh, query, whereClause)) {
    14961497    psError(PS_ERR_UNKNOWN, false, "database error");
     1498    psFree(whereClause);
    14971499    psFree(query);
    14981500    return false;
    14991501  }
     1502  psFree(whereClause);
    15001503  psFree(query);
    15011504
Note: See TracChangeset for help on using the changeset viewer.