Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: DBD::mysql fetchrow_array failed

by Herkum (Parson)
on Jul 09, 2009 at 19:55 UTC ( #778683=note: print w/replies, xml ) Need Help??

in reply to DBD::mysql fetchrow_array failed

$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.

Replies are listed 'Best First'.
Re^2: DBD::mysql fetchrow_array failed
by deadpickle (Pilgrim) on Jul 09, 2009 at 20:47 UTC
    Seems to have worked. Thanks a lot.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://778683]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2018-07-19 20:49 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (420 votes). Check out past polls.