Changeset 14023 for trunk/ippTools/src/pztool.c
- Timestamp:
- Jul 5, 2007, 3:16:08 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pztool.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pztool.c
r12093 r14023 140 140 " FROM pzPendingExp" 141 141 " JOIN summitExp" 142 " USING(exp_ id, camera, telescope)"142 " USING(exp_name, camera, telescope)" 143 143 ); 144 144 … … 197 197 "SELECT" 198 198 " summitImfile.*," 199 " pzPendingImfile.exp_ tag"199 " pzPendingImfile.exp_id" 200 200 " FROM pzPendingImfile" 201 201 " JOIN summitImfile" 202 " USING(exp_ id, camera, telescope, class, class_id)"202 " USING(exp_name, camera, telescope, class, class_id)" 203 203 ); 204 204 … … 255 255 256 256 bool status = false; 257 psString exp_ id = psMetadataLookupStr(&status, config->args, "-exp_id");258 if (!status) { 259 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_ id");260 return false; 261 } 262 if (!exp_ id) {263 psError(PS_ERR_UNKNOWN, true, "-exp_ idis required");257 psString exp_name = psMetadataLookupStr(&status, config->args, "-exp_name"); 258 if (!status) { 259 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_name"); 260 return false; 261 } 262 if (!exp_name) { 263 psError(PS_ERR_UNKNOWN, true, "-exp_name is required"); 264 264 return false; 265 265 } … … 315 315 } 316 316 317 // need to know exp_ id, camera, telescope, class, class_id (to find the317 // need to know exp_name, camera, telescope, class, class_id (to find the 318 318 // pzPendingImfile entry and the URI for the newImfile entry. 319 319 … … 329 329 "INSERT INTO newImfile" 330 330 " SElECT" 331 " pzPendingImfile.exp_ tag,"331 " pzPendingImfile.exp_id," 332 332 " pzPendingImfile.class," 333 333 " pzPendingImfile.class_id," … … 336 336 " FROM pzPendingImfile" 337 337 " WHERE" 338 " pzPendingImfile.exp_ id= '%s'"338 " pzPendingImfile.exp_name = '%s'" 339 339 " AND pzPendingImfile.camera = '%s'" 340 340 " AND pzPendingImfile.telescope = '%s'" … … 342 342 " AND pzPendingImfile.class_id = '%s'"; 343 343 344 if (!p_psDBRunQuery(config->dbh, query, uri, exp_ id, camera, telescope, class, class_id)) {344 if (!p_psDBRunQuery(config->dbh, query, uri, exp_name, camera, telescope, class, class_id)) { 345 345 // rollback 346 346 if (!psDBRollback(config->dbh)) { … … 372 372 " FROM pzPendingImfile" 373 373 " WHERE" 374 " pzPendingImfile.exp_ id= '%s'"374 " pzPendingImfile.exp_name = '%s'" 375 375 " AND pzPendingImfile.camera = '%s'" 376 376 " AND pzPendingImfile.telescope = '%s'" … … 378 378 " AND pzPendingImfile.class_id = '%s'"; 379 379 380 if (!p_psDBRunQuery(config->dbh, query, uri, exp_ id, camera, telescope, class, class_id)) {380 if (!p_psDBRunQuery(config->dbh, query, uri, exp_name, camera, telescope, class, class_id)) { 381 381 // rollback 382 382 if (!psDBRollback(config->dbh)) { … … 404 404 "DELETE FROM pzPendingImfile" 405 405 " WHERE" 406 " pzPendingImfile.exp_ id= '%s'"406 " pzPendingImfile.exp_name = '%s'" 407 407 " AND pzPendingImfile.camera = '%s'" 408 408 " AND pzPendingImfile.telescope = '%s'" … … 410 410 " AND pzPendingImfile.class_id = '%s'"; 411 411 412 if (!p_psDBRunQuery(config->dbh, query, exp_ id, camera, telescope, class, class_id)) {412 if (!p_psDBRunQuery(config->dbh, query, exp_name, camera, telescope, class, class_id)) { 413 413 // rollback 414 414 if (!psDBRollback(config->dbh)) {
Note:
See TracChangeset
for help on using the changeset viewer.
