Short Answer:

$sth->execute()

Long Answer:

Wanna bet most of those variables don't contain SQL literals?

my $sql = " insert into BiscHet ( pdbAndChainID1, asaSingle1, asaComplex1, organismPdb1, taxidPdb1, scopClass1, scopFold1, scopSuperfamily1, scopFamily1, intactID1, evalue1, length1, identity1, organismIntact1, taxidIntact1, pdbAndChainID2, asaSingle2, asaComplex2, organismPdb2, taxidPdb2, scopClass2, scopFold2, scopSuperfamily2, scopFamily2, intactID2, evalue2, length2, identity2, organismIntact2, taxidIntact2, sequenceAtom2, sequenceSeqRes2, jmolSelect, interface ) VALUES (".join(',', ('?')x34 ).") " my $sth = $dbh->prepare($sql) or die $dbh->errstr; $sth->execute( $id1, $asaSingleC1, $asaComplexC1, $organismC1, $taxidC1, $scopClassC1, $scopFoldC1, $scopSuperfamilyC1, $scopFamilyC1, $uniprotID1, $evalue1, $length1, $identity1, $organismIntAct1, $taxidIntAct1, $id2, $asaSingleC2, $asaComplexC2, $organismC2, $taxidC2, $scopClassC2, $scopFoldC2, $scopSuperfamilyC2, $scopFamilyC2, $uniprotID2, $evalue2, $length2, $identity2, $organismIntAct2, $taxidIntAct2, 'ATCGT', 'GATAT', 'NA', 'interface' ) or die $dbh->errstr; $sth->finish();

Finally, the presence of fields X1 and X2 is usually a sign of a bad database design, and here is no exception.


In reply to Re: $sth->execute error by ikegami
in thread $sth->execute error by RobertCraven

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.