I want to first check to see if a row is returned and if so update it. There will only be one row per serial number. I think i am close. And is the the best way to do it???
[php]
Status ScreenOpen RedTags
<?php $serial=$_POST["serial"]; $connect =odbc_connect("removed"); if(!$connect) { exit("Connection Failed: " . $connect); } $query= " Select serial from WIP_Master where serial ='$serial' "; $sql=" Update WIP_Master set redtagclosed='N' where serial ='$serial' "; $result =odbc_exec($connect,$query); if (odbc_num_rows($query)){ $result =odbc_exec($connect,$sql); } if(!$result){ trigger_error("Error in SQL".odbc_errormsg()); } odbc_close($connect); sleep(5); $url = 'http://theintranet/kk_update_redtag_lk.php'; header('Location: ' . $url); ?> [/php]