I have two queries I am trying to execute in PHP. For reasons unknown to me only 1 query will execute and the other will not. If I try running the following, the first update works but the 2nd query does not. If I comment the first query and run this, the 2nd update works just fine. Any ideas why this is happening?
$sql = "update " . $_POST["table"] . "_dtl
set cd_eff_end_ts = DATE_SUB( '" . $_POST["CD_EFF_STRT_TS"] . "', INTERVAL 1 SECOND)
where " . $_POST["pk"] . " = '" . $_POST[$_POST["pk"]] . "'
and cd_eff_end_ts = '3500-12-31 23:59:59'
and idw_cd_lfcyc_stat_typ_cd in ('RAP', 'RAM')";
$conn->query($sql);
$sql = "update " . $_POST["table"] . "_dtl
set rec_eff_strt_ts = current_timestamp,
rec_eff_end_ts = '3500-12-31 23:59:59',
idw_cd_lfcyc_stat_typ_cd = '" . $status ."',
idw_lfcyc_stat_ts = current_timestamp,
lfcyc_stat_decreed_by_user_id = " . $user . ",
idw_lfcyc_stat_rtnle_txt = '" . $_POST["IDW_LFCYC_STAT_RTNLE_TXT"] . "'
where rqst_nbr = " . $_POST["rqst_nbr"];
$conn->query($sql);
Thank you.