Changeset 25562 for trunk/tools/examine_burntool_pcontrol.pl
- Timestamp:
- Sep 24, 2009, 3:22:13 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/tools/examine_burntool_pcontrol.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/examine_burntool_pcontrol.pl
r25472 r25562 5 5 use Getopt::Std; 6 6 7 getopts('hfcP ',\%opt);7 getopts('hfcPv:',\%opt); 8 8 if (exists($opt{h})) { 9 9 print STDERR "Usage: examine_burntool_pcontrol.pl [-f] <pcontrol.pro>\n"; 10 10 print STDERR " -f Read all burntool entries, even those commented out.\n"; 11 11 print STDERR " -c Print out the needed mysql statement to do a convert. DOES NOT EXECUTE THIS!\n"; 12 print STDERR " -v <val> Use this value as the target burntool_state in convert statements.\n"; 12 13 print STDERR " -P Print out the ipp_apply_burntool.pl commands, even if fully updated.\n"; 13 14 print STDERR "\n"; … … 124 125 # Get the data. The limit is there to keep the database happy. I don't think you can observe that many 125 126 # images on a single night. 126 $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 60000"; 127 128 $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' AND user_1 = 1.0;"; 127 $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 600000"; 128 129 129 $data_ref = $db->selectall_arrayref( $sth ); 130 130 … … 140 140 print "#### $sth\n"; 141 141 if (exists($opt{c})) { 142 if (exists($opt{v})) { 143 $no_sth = "UPDATE rawImfile SET burntool_state = $opt{v} WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';"; 144 } 145 else { 146 $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}';"; 147 } 142 148 print "#### $no_sth\n"; 143 149 }
Note:
See TracChangeset
for help on using the changeset viewer.
