<?xml version="1.0" encoding="windows-1252"?>
<node id="905610" title="Re: Update is not working properly with Perl DBI Module" created="2011-05-19 00:44:21" updated="2011-05-19 00:44:21">
<type id="11">
note</type>
<author id="62157">
tokpela</author>
<data>
<field name="doctext">
&lt;p&gt;
Two things I see (not sure if this will solve your issue):
&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;
my $update_ids = $dbh-&gt;prepare("UPDATE queue set processed = \'T\' where id = $ids");
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;
my $update_ids = $dbh-&gt;prepare("UPDATE queue set processed = 'T' where id = ?");
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
</field>
<field name="root_node">
905524</field>
<field name="parent_node">
905524</field>
</data>
</node>
