hello kind monks:

I have a bit of code that needs retrieve an integer from the results a Postgresql function. I am having difficulty getting at the integer returned. How am I supposed to get at the value returned?

many thanks for you attention to this matter.

KD
$sqlStr = "select createwbparserun( '$directory' , '$filename' ) + "; print $sqlStr. "\n" ; my $sth = $db_in->prepare( $sqlStr ); $sth->execute(); my @aRow = $sth->fetchall_arrayref([0]); print Dumper @aRow; my @ta = $aRow[0]; print Dumper @ta; print " the array: " . $ta[0][0] . "\n" ; ## $wb_runkey = $aRow[0]; print "WORKBOOK run key: " . $wb_runkey . "\n" ;
which returns the following:
select createwbparserun( 'C:/dev/HN_optimum/' , 'FM Mk 14 - 60M200007_ +DB200609.xls' ) $VAR1 = [ [ '45' ] ]; $VAR1 = [ [ '45' ] ]; the array: ARRAY(0xcec7960) WORKBOOK run key: 0 Died at parseExcelWB.pl line 197.

In reply to DBI fetchall_arrayref by kevind0718

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.