$query_handle = $db->prepare($query); $query_handle->execute(); while(my @row = $query_handle->fetchrow_array()) { #ERROR HERE #~ Update only available data to 'Email Received' status if ($row[0] eq '1') { $query = "update radar_data set status=2 where dataid= +$row[1] and datatype=$data_type and hasid ='$HAS_break[5]';"; $query_handle = $db->prepare($query); $query_handle->execute(); } }
You are overwriting your 'select' $query_handle and replacing it with the 'Update' sql syntax being executed. in the loop. You need to not use $query_handle in both places.
In reply to Re: DBD::mysql fetchrow_array failed
by Herkum
in thread DBD::mysql fetchrow_array failed
by deadpickle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |