Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Update is not working properly with Perl DBI Module

by tokpela (Chaplain)
on May 19, 2011 at 04:44 UTC ( [id://905610]=note: print w/replies, xml ) Need Help??


in reply to Update is not working properly with Perl DBI Module

Two things I see (not sure if this will solve your issue):

my $update_ids = $dbh->prepare("UPDATE queue set processed = \'T\' whe +re id = $ids");

You are preparing the update statement on every while loop iteration. I think you should prepare the update statement before the while loop and use a placeholder for your id value.

my $update_ids = $dbh->prepare("UPDATE queue set processed = 'T' where + id = ?");

Also, what is the \'T\' for? 'T' should work fine since you are quoting the SQL with double quotes and don't need to escape the single quote.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://905610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2026-01-15 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.