Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
yes i tried. login correct. table exist. for the data, look at the dump => itīs a table line out of the DB. the scriptline actually works:
mysql>insert into $table (version,filename,release_notes,rec_level,os_ +type) values ("1.0","1.txt","1.txt",3,4)\g
there is no succeeded message given from perl. only the dump comes out of it.

my $sth = $dbh->prepare("INSERT INTO $table(version,filename,release +_notes,rec_level,os_type) VALUES(?,?,?,?,?)"); $sth->execute( "test","test","test",1,1);
$VAR1 = ' DBI::db=HASH(0x35bffc4) trace level set to 0x0/1 (DBI @ 0 +x0/0) in D BI 1.616-ithread (pid 2144) <- prepare(\'INSERT INTO table_1(version,filename,release _notes,rec_level,os_type) VALUES(?,?,?,?,?)\')= ( DBI::st=HASH(0x35ed6 +ec) ) [1 i tems] at sql.pl line 21 <- execute(\'test\', \'test\', ...)= ( 1 ) [1 items] at sql.pl lin +e 22 <- prepare(\'SELECT * FROM nl_firmware_recommendation\')= ( DBI::s +t=HASH(0x3 5d7bcc) ) [1 items] at sql.pl line 24 <- execute= ( 2 ) [1 items] at sql.pl line 25 !! ERROR: 2000 CLEARED by call to fetch method <- fetchrow_hashref= ( HASH(0x35f117c)16keys ) [1 items] row1 at s +ql.pl line 26 !! ERROR: 2000 CLEARED by call to fetch method !! ERROR: 2000 CLEARED by call to fetch method <- fetchrow_hashref= ( undef ) [1 items] row2 at sql.pl line 26 <- finish= ( 1 ) [1 items] at sql.pl line 29 <- disconnect= ( 1 ) [1 items] at sql.pl line 30 ';
this worked. but why $dbh->do is not able to do this?
and whats about:     !! ERROR: 2000 CLEARED by call to fetch method?
$perlig =~ s/pec/cep/g if 'errors expected';

In reply to Re^2: MySQL insert via DBI by AlexTape
in thread MySQL insert via DBI by AlexTape

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (7)
    As of 2014-08-01 10:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Who would be the most fun to work for?















      Results (4 votes), past polls