Howdy all, one thing that I would like to do with bind_columns() is to have it dynamically adjust the variable list. I'd like to use the same prepare/execute/bind_columns in a loop but insert different select strings for the prepare statement. With this there may be a different number of variables returned depending on the select statement. One could just make an if statement to detect that but it would be far better if the one could just say that the var names are of the form $Col# and let it fill in the number value up to the number of values returned. Thus dynamically preparing the proper number of vars. If throws an error if you alocate too many ahead of time rather than just NULL filling them or leaving them undefined. Is this even possible? Alan D.

In reply to Re: DBI Bind Columns by Anonymous Monk
in thread DBI Bind Columns 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.