Well, hmmm ... you're using the hash values correctly where you use them, but this isn't exactly ANSI compliant SQL you're using in spots. You also appear to be using DBI, but not in a consistent fashion. This not being SQL monks, some of what you'll need to know isn't readily available on this site; get (buy, or borrow) a book on basic SQL.

I'll let you in on one of the neatest things about DBI, though: placeholders. Their use is well documented in the DBI documentation, which you should read in addition to any materials on SQL you tackle. Basically, you can prepare a statement once, and execute it many times while filling in different values on each execution.

Rather than just feed you the code, on this occasion I'm going to point to the Tutorials page (me do that? yes!) and especially to the DBI section thereof.

HTH!


In reply to Re: Hash Value Part 2 by arturo
in thread Hash Value Part 2 by qball

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.