<?xml version="1.0" encoding="windows-1252"?>
<node id="926860" title="Re^2: MySQL insert via DBI" created="2011-09-20 04:34:23" updated="2011-09-20 04:34:23">
<type id="11">
note</type>
<author id="893562">
perlig</author>
<data>
<field name="doctext">
yes i tried. login correct. table exist. for the data, look at the dump =&gt; itīs a table line out of the DB. the scriptline actually works:
&lt;code&gt;
mysql&gt;insert into $table (version,filename,release_notes,rec_level,os_type) values ("1.0","1.txt","1.txt",3,4)\g&lt;/code&gt;
there is no succeeded message given from perl. only the dump comes out of it.&lt;br&gt;
&lt;br&gt;
&lt;code&gt;
  my $sth = $dbh-&gt;prepare("INSERT INTO $table(version,filename,release_notes,rec_level,os_type) VALUES(?,?,?,?,?)");
  $sth-&gt;execute( "test","test","test",1,1);&lt;/code&gt;

&lt;code&gt;
$VAR1 = '    DBI::db=HASH(0x35bffc4) trace level set to 0x0/1 (DBI @ 0x0/0) in D
BI 1.616-ithread (pid 2144)
    &lt;- prepare(\'INSERT INTO table_1(version,filename,release
_notes,rec_level,os_type) VALUES(?,?,?,?,?)\')= ( DBI::st=HASH(0x35ed6ec) ) [1 i
tems] at sql.pl line 21
    &lt;- execute(\'test\', \'test\', ...)= ( 1 ) [1 items] at sql.pl line 22
    &lt;- prepare(\'SELECT * FROM nl_firmware_recommendation\')= ( DBI::st=HASH(0x3
5d7bcc) ) [1 items] at sql.pl line 24
    &lt;- execute= ( 2 ) [1 items] at sql.pl line 25
    !! ERROR: 2000 CLEARED by call to fetch method
    &lt;- fetchrow_hashref= ( HASH(0x35f117c)16keys ) [1 items] row1 at sql.pl line
 26
    !! ERROR: 2000 CLEARED by call to fetch method
    !! ERROR: 2000 CLEARED by call to fetch method
    &lt;- fetchrow_hashref= ( undef ) [1 items] row2 at sql.pl line 26
    &lt;- finish= ( 1 ) [1 items] at sql.pl line 29
    &lt;- disconnect= ( 1 ) [1 items] at sql.pl line 30
';&lt;/code&gt;

this worked. but why $dbh-&gt;do is not able to do this?&lt;br&gt;
and whats about: 
&lt;code&gt;    !! ERROR: 2000 CLEARED by call to fetch method&lt;/code&gt;?
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-893562"&gt;
$perlig =~ s/pec/cep/g if 'errors expected';

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
926759</field>
<field name="parent_node">
926785</field>
</data>
</node>
