This code has some issues...
  1. if ($PHONE, $ID_NUMBER) - That is equivalent to if ($ID_NUMBER). I guess you want an and or an or instead of the comma, but don't dare to guess.
  2. You assign an arrayref to $P (something like [ 1 ], and then compare this arrayref to the actual phone number. Under no circumstances will this be equal. Probably you want to test if $P->[0].
  3. You test $P eq $PHONE twice. The second test should probably test $ID->[0]
  4. You select from tbl1 and insert into tb11, that are two different tables (lowercase 'L' plus number 1 vs. number 11).
  5. You should always use strict and use warnings.
  6. You should use uppercase variable names only for constants.
  7. You should check for errors after your calls to execute.

In reply to Re: problem checking availability by haj
in thread problem checking availability by bigup401

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.