> --Thanks for the reply:
>
> --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()
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.
HTH
Dmuey
>
> --Thanks again!
>
> -X
>
> [snip]
>
> >>>
> >>> I have a script where I want to
> >>>
> >>> * connect to database
> >>> * create a subroutine where it executes
> >>> and returns the value of the SQL
> >>> * pass that value to another area
> >>> to check and IF statement
> >>> * continue with program
> >>>
> >>> I am having problems trying to figure out
> >>> if the SQL is actually being processed
> >>> and if so, why the value isn't being returned.
> >>
> >> do() returns 0E0 on error and number of rows affected as
> >>provided by mysql.
> >>I think you want selectrow_array()
> >>
> >> my($joe,$mama) = $dbh->selectrow_array('SELECT joe,mama FROM
> >>joemama WHERE ID=83');
> >>
> >>
> >>HTH
> >>
> >>DMuey
> >>>
> >>> [snip script]
> >>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]