It would be easier to incorporate everything into the SQL database, but if that's not what you want then try this. First off, you might want to use strict and declare your variables. I doubt that would fix your problem, but it might help. I don't know what you are wanting $status to equal, but in the way perl runs status will either equal 1 or null if I remember right. If you are wanting $status to equal $pointer->{'status'} then you need to fix your if statement to be:
if ((my $status = $pointer->{'status'}) eq '1') {
Also, I am assuming that status in your sql database is a int so you should change the eq '1' and eq '2' to == 1 and == 2. I don't know if that's the exact problem, but It might fix it.
if ((my $status = $pointer->{'status'}) == 1) { #yada yada } if ((my $status = $pointer->{'status'}) == 2) { #yada yada yada }

In reply to Re: Counter Issue by Mercio
in thread Counter Issue by Anonymous Monk

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.