Hello monks, Here's the code I'm working with:
my $sth2 = $dbh->prepare( "SELECT WORKERID,FAMID,CHILDID FROM p9315_2_ +partial_data WHERE WORKERID = '$pass'" ); $sth2->execute(); while ( $array_ref_partial = $sth2->fetchrow_arrayref ) {push @rows_pa +rtial, [ $array_ref_partial ]; #copy array contents to @row push (@partial_famids, @$array_ref_partial[1] );
When I look at the values that are pushed onto the @partial_famids array, I find the correct values (the 2nd) elements from the @$array_ref_partial array, but they have a '1' attached to them. For example, where I might expect to see values of 'family', 'smith', and 'stevenson' I find 'family1', 'smith1' and 'stevenson1'.

This is querying a MySQL database under Windows95.

Obviously, I'd like to know why I'm seeing that '1' attached to my values. I'm guessing somehow that array reference value is making its way into the data, but I have no idea how. The values look correct in the database.

I've spent the afternoon reading various bits of documentation but I'm coming up empty. Any help is much appreciated.

Peace,

Scratch


In reply to referring to individual elements after fetchrow_arrayref finds a '1' attached by scratch

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.