There is so much wrong with this question -- let us begin at the begine...

  1. Read formatting tips
  2. Don't include more code than necessary to ask the question.
  3. State the error properly
Now, wrt your question -- what error do you get? You say in a later email that you get more than one record. Well, then how about changing your SQL query so that it asks the database the correct question.

See, suddenly your question is no longer a Perl question but a SQL question... all that extra html code and DBI connection info is just confusing and takes up space. The long code line (you have likely used the <pre> tags instead of the code tags) is screwing up my browser window (I hate horizontal scroll bars).

--
when small people start casting long shadows, it is time to go to bed

In reply to Re: Returning a single record by punkish
in thread Returning a single record by Doyle

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.