Hello Esteemed Colleagues,

What I want to do is,

Retrieve data from a database.
put this into @currentpoll
Currentpoll returns the following array

idfieldcontentdate
11currentpollTest Poll2006-03-23

There is other data in this table, however i retrieve doing the following search

my @currentpoll = LSRfm::Database::Data->search(field => 'currentpoll' +);

Hence there is only one row.

Now I want to put the content column into a "memory box" called @search, so in this case @seacrh would be Test Poll,
now i want to take @search and use its value to search a different database in a similar fashion to;

my @pollresults = LSRfm::Database::PollResults->search(field => @searc +h);

Hopefully that should have cleared up the questions from How to access an Array Element

The idea with this being I can change the currentpoll Content value, without having to alter the perl script.

Yours

Barry Carlyon


In reply to Ok, How to access an array element rewritten by barrycarlyon

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.