--Howdy:

--Sorry, I should have added more detail in
--my reply.  When I did the posted suggestion,
--I only got one column, but if I ran the SQL
--by hand, I got them all.

--But in the example below, you list out the
--variables and then get the entire row.
--I thought I could just pull in the
--results of the query with one variable
--($sql).

 
>>> --I think I'm well on my way, but, I'm looking
>>> --at the results and the 'Programming the PERL DBI'
>>> --book and it says that selectrow_array returns the 
>>> --value of the first field.
>>
>>It returns an array:
>> my ($one,$two,$three) = $dbh->selectrow_array("SELECT 
>>one,two,three FROM table WHERE ID=1");
>>Or 
>> my @stuff = $dbh->selectrow_array("SELECT one,two,three FROM 
>>table WHERE ID=1");
>>
>>It return an array for the first *row* so if it's a multirow 
>>select then you'll only get the first *row* returned.
>>
>>Why not simply try some of the stuff and experiment and see 
>>what happens when you do different things.
>>
>>> 
>>> --selectall_arrayref and selectcol_arrayref
>>> --doesn't seem to help.
>>> 
>>> --how can I return all of the fields that
>>> --was selected?
>>
>>All fields into an array : selectrow_array()

--i was wondering why my other script that used
--the prepare / execute / while ($whatever) { ...}
--did what i wanted (but overkill for one silly row).
--i thought the docs said that selectrow_array()
--puts all of the 'prepare' / 'execute' in one
--function and made the need for the extra 15
--lines of code go away.

--you're right:  i have to continue playing with
--it until i get the right runes.

>>All Rows you have to do the prepare execute while finish dance
>>I actually have a simpler way to do it I'm going to have in 
>>module if I ever hear back from the PAUSE folks. But until 
>>then that's it.

--thanks again!

[snip]

-X

Reply via email to