This script works for me on linux with DBI 1.45 and DBD::SQLite 1.07. If you are testing only via the web, you should probably put in "use CGI::Carp qw(fatalsToBrowser)" to make sure you see error output. Although I wrote the test script you are using, I'm wondering if I was being too clever with the "if $sth->{NUM_OF_FIELDS}" since perhaps older versions of DBD::SQLite don't set NUM_OF_FIELDS (although they should, and do AFAIK). Just in case, try changing that to "if $sql =~ /^\s*SELECT/". If you continue to get errors, please show the results of DBI->installed_versions.

In reply to Re: SQL INSERTs don't work by jZed
in thread SQL INSERTs don't work by ido50

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.