Changeset 9272 for trunk/ippTools/src/camtool.c
- Timestamp:
- Oct 4, 2006, 4:03:21 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/camtool.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r9271 r9272 58 58 // and have no associated imfiles left in newImfile 59 59 60 char *query = 61 "SELECT newExp.*" 62 " FROM newExp" 63 " LEFT JOIN newImfile USING(exp_tag)" 64 " LEFT JOIN rawScienceExp USING(exp_tag)" 65 " LEFT JOIN rawDetrendExp USING(exp_tag)" 66 " WHERE" 67 " newExp.exp_tag IS NOT NULL" 68 " AND newImfile.exp_tag IS NULL" 69 " AND rawScienceExp.exp_tag IS NULL" 70 " AND newExp.imfiles =" 71 " (SELECT COUNT(exp_tag) FROM rawImfile" 72 " WHERE rawImfile.exp_tag = newExp.exp_tag)" 73 ; 60 psString query = psStringCopy("SELECT * FROM p3PendingExp"); 61 62 if (config->where) { 63 psString whereClause = psDBGenerateWhereSQL(config->where, NULL); 64 psStringAppend(&query, " %s", whereClause); 65 psFree(whereClause); 66 } 74 67 75 68 if (!p_psDBRunQuery(config->dbh, query)) { 76 69 psError(PS_ERR_UNKNOWN, false, "database error"); 70 psFree(query); 77 71 return false; 78 72 } 73 psFree(query); 79 74 80 75 psArray *output = p_psDBFetchResult(config->dbh); … … 85 80 if (!psArrayLength(output)) { 86 81 // XXX check psError here 87 psError(PS_ERR_UNKNOWN, false, "no p ending newExp rows found");82 psError(PS_ERR_UNKNOWN, false, "no p3PendingExp rows found"); 88 83 psFree(output); 89 84 return true; … … 101 96 102 97 // negate simple so the default is true 103 if (!ippdbPrintMetadatas(stdout, output, " newImfile", !simple)) {98 if (!ippdbPrintMetadatas(stdout, output, "p3PendingExp", !simple)) { 104 99 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 105 100 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
