From: Anthony Talarico Date: Thu, 31 Mar 2016 16:31:35 +0000 (-0400) Subject: removing db_Auto_exec statments X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=1060a18599ebc6306f9eaa62979d6f89d95189b9;p=prog%2FPelstonFlightData.git removing db_Auto_exec statments --- diff --git a/glmfds.php b/glmfds.php index dcd25f8..9c42179 100644 --- a/glmfds.php +++ b/glmfds.php @@ -1,8 +1,8 @@ wpdb->insert(); - if( $flight_type != 'Z' ) - { - - if( ($f = db_auto_get_row( "SELECT msg_seq_id FROM flight WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", 0, SI_CONN_STR, FALSE )) == false ) - { - db_auto_exec( "INSERT INTO flight - ( - msg_dtm, msg_seq_id, flt_orig_date, flt_airline, flt_numb, flt_leg_orig, flt_leg_dest, flt_leg_vers, - sch_leg_orig, sch_leg_dest, sch_dep_time, sch_off_time, sch_on_time, sch_in_time, cur_dep_time, cur_dep_time_code, - cur_off_time , cur_off_time_code, cur_on_time, cur_on_time_code, cur_in_time, cur_in_time_code, delay_code, - depart_gate, arriv_gate, radio_code, aircraft, reg_numb, remarks, food_code, flight_type, downline_leg, - overfly, canceled, dep_ontime, arriv_ontime - ) - VALUES - ( - '$msg_dtm', '$msg_seq_id', '$flt_orig_date', '$flt_airline', '$flt_numb', '$flt_leg_orig', '$flt_leg_dest', $flt_leg_vers, - '$sch_leg_orig', '$sch_leg_dest', '$sch_dep_time', '$sch_off_time', '$sch_on_time', '$sch_in_time', '$cur_dep_time', '$cur_dep_time_code', - '$cur_off_time', '$cur_off_time_code', '$cur_on_time', '$cur_on_time_code', '$cur_in_time', '$cur_in_time_code', '$delay_code', - '$depart_gate', '$arriv_gate', '$radio_code', '$aircraft', '$reg_numb', '$remarks', '$food_code', '$flight_type', '$downline_leg', - '$overfly', '$canceled', '$dep_ontime', '$arriv_ontime' - );", SI_CONN_STR, FALSE ); - - echo "Flight $flt_numb on $flt_orig_date added
"; - } - else - { - if( $msg_seq_id <= $f['msg_seq_id'] ) - echo 'Duplicate message or message out of sequence.
'; - else - { - db_auto_exec( "UPDATE flight SET - msg_dtm = '$msg_dtm', msg_seq_id = '$msg_seq_id', - flt_leg_orig = '$flt_leg_orig', flt_leg_dest = '$flt_leg_dest', flt_leg_vers = $flt_leg_vers, sch_leg_orig = '$sch_leg_orig', - sch_leg_dest = '$sch_leg_dest', sch_dep_time = '$sch_dep_time', sch_off_time = '$sch_off_time', sch_on_time = '$sch_on_time', - sch_in_time = '$sch_in_time', cur_dep_time = '$cur_dep_time', cur_dep_time_code = '$cur_dep_time_code', cur_off_time = '$cur_off_time', - cur_off_time_code = '$cur_off_time_code', cur_on_time = '$cur_on_time', cur_on_time_code = '$cur_on_time_code', cur_in_time = '$cur_in_time', - cur_in_time_code = '$cur_in_time_code', delay_code = '$delay_code', depart_gate = '$depart_gate', arriv_gate = '$arriv_gate', - radio_code = '$radio_code', aircraft = '$aircraft', reg_numb = '$reg_numb', remarks = '$remarks', food_code = '$food_code', flight_type = '$flight_type', - downline_leg = '$downline_leg', overfly = '$overfly', canceled = '$canceled', dep_ontime = '$dep_ontime', arriv_ontime = '$arriv_ontime' - WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", SI_CONN_STR, FALSE ); - echo "Flight $flt_numb on $flt_orig_date updated
"; - } - } - - } // end of if flight_type != 'Z' +// if( $flight_type != 'Z' ) +// { +// +// if( ($f = db_auto_get_row( "SELECT msg_seq_id FROM flight WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", 0, SI_CONN_STR, FALSE )) == false ) +// { +// db_auto_exec( "INSERT INTO flight +// ( +// msg_dtm, msg_seq_id, flt_orig_date, flt_airline, flt_numb, flt_leg_orig, flt_leg_dest, flt_leg_vers, +// sch_leg_orig, sch_leg_dest, sch_dep_time, sch_off_time, sch_on_time, sch_in_time, cur_dep_time, cur_dep_time_code, +// cur_off_time , cur_off_time_code, cur_on_time, cur_on_time_code, cur_in_time, cur_in_time_code, delay_code, +// depart_gate, arriv_gate, radio_code, aircraft, reg_numb, remarks, food_code, flight_type, downline_leg, +// overfly, canceled, dep_ontime, arriv_ontime +// ) +// VALUES +// ( +// '$msg_dtm', '$msg_seq_id', '$flt_orig_date', '$flt_airline', '$flt_numb', '$flt_leg_orig', '$flt_leg_dest', $flt_leg_vers, +// '$sch_leg_orig', '$sch_leg_dest', '$sch_dep_time', '$sch_off_time', '$sch_on_time', '$sch_in_time', '$cur_dep_time', '$cur_dep_time_code', +// '$cur_off_time', '$cur_off_time_code', '$cur_on_time', '$cur_on_time_code', '$cur_in_time', '$cur_in_time_code', '$delay_code', +// '$depart_gate', '$arriv_gate', '$radio_code', '$aircraft', '$reg_numb', '$remarks', '$food_code', '$flight_type', '$downline_leg', +// '$overfly', '$canceled', '$dep_ontime', '$arriv_ontime' +// );", SI_CONN_STR, FALSE ); +// +// echo "Flight $flt_numb on $flt_orig_date added
"; +// } +// else +// { +// if( $msg_seq_id <= $f['msg_seq_id'] ) +// echo 'Duplicate message or message out of sequence.
'; +// else +// { +// db_auto_exec( "UPDATE flight SET +// msg_dtm = '$msg_dtm', msg_seq_id = '$msg_seq_id', +// flt_leg_orig = '$flt_leg_orig', flt_leg_dest = '$flt_leg_dest', flt_leg_vers = $flt_leg_vers, sch_leg_orig = '$sch_leg_orig', +// sch_leg_dest = '$sch_leg_dest', sch_dep_time = '$sch_dep_time', sch_off_time = '$sch_off_time', sch_on_time = '$sch_on_time', +// sch_in_time = '$sch_in_time', cur_dep_time = '$cur_dep_time', cur_dep_time_code = '$cur_dep_time_code', cur_off_time = '$cur_off_time', +// cur_off_time_code = '$cur_off_time_code', cur_on_time = '$cur_on_time', cur_on_time_code = '$cur_on_time_code', cur_in_time = '$cur_in_time', +// cur_in_time_code = '$cur_in_time_code', delay_code = '$delay_code', depart_gate = '$depart_gate', arriv_gate = '$arriv_gate', +// radio_code = '$radio_code', aircraft = '$aircraft', reg_numb = '$reg_numb', remarks = '$remarks', food_code = '$food_code', flight_type = '$flight_type', +// downline_leg = '$downline_leg', overfly = '$overfly', canceled = '$canceled', dep_ontime = '$dep_ontime', arriv_ontime = '$arriv_ontime' +// WHERE flt_orig_date = '$flt_orig_date' AND flt_numb = '$flt_numb';", SI_CONN_STR, FALSE ); +// echo "Flight $flt_numb on $flt_orig_date updated
"; +// } +// } +// +// } // end of if flight_type != 'Z' } // Store for analysis