Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Mysterious Code "DBI" - Why is this working?

by hubb0r (Pilgrim)
on Jun 09, 2005 at 05:58 UTC ( [id://464975]=note: print w/replies, xml ) Need Help??


in reply to Mysterious Code "DBI" - Why is this working?

I think you are looking for:
while (my $market = $market_sth->fetchrow_arrayref) { print "<option value=\"${market->[0]}\">${market->[0]}</option>" ; }
or something along those lines. You are returning into a scalar an should this be returning a scalar value from your db call. This will give you back a refernce to a single row of the return for each time through the while. Hence just reference the 0th element of the ar_ref and you'll have what you're looking for.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://464975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2024-04-23 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found