Changeset 31687 for trunk/ippTools/src/staticskytool.c
- Timestamp:
- Jun 22, 2011, 4:12:33 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/staticskytool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/staticskytool.c
r31681 r31687 102 102 103 103 // optional 104 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);104 PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false); 105 105 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 106 106 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); … … 125 125 int num_filter = filters->data.list->n; 126 126 127 PXOPT_LOOKUP_BOOL(group_by_data_group, config->args, "-group_by_data_group", false); 128 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 127 129 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 128 130 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); 129 131 PXOPT_LOOKUP_BOOL(check_inputs, config->args, "-check_inputs", false); 130 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 131 132 psString select = pxDataGet("staticskytool_definebyquery_select.sql"); 132 133 psString select; 134 if (group_by_data_group) { 135 select = pxDataGet("staticskytool_definebyquery_select_by_dg.sql"); 136 } else { 137 select = pxDataGet("staticskytool_definebyquery_select.sql"); 138 } 133 139 if (!select) { 134 140 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement"); … … 150 156 psFree(whereMD); 151 157 158 psString where2 = NULL; 152 159 psString make_unique = NULL; 153 160 if (!rerun) { 161 psStringAppend(&where2, "\n %s\nAND staticskyRun.label = '%s'", where, label); 154 162 psStringAppend(&make_unique, "\nAND sky_id IS NULL"); 155 163 } 156 164 157 if (!p_psDBRunQueryF(config->dbh, select, where, where , num_filter, make_unique ? make_unique : "")) {165 if (!p_psDBRunQueryF(config->dbh, select, where, where2 ? where2 : where, num_filter, make_unique ? make_unique : "")) { 158 166 psError(PS_ERR_UNKNOWN, false, "database error"); 159 167 psFree(select); … … 161 169 } 162 170 psFree(select); 171 psFree(where2); 163 172 psFree(make_unique); 164 173
Note:
See TracChangeset
for help on using the changeset viewer.
