hakkr has asked for the wisdom of the Perl Monks concerning the following question:
my $query = "SELECT id FROM table WHERE user=$user"; my $results=$self->query($query)->fetchrow_array;
#----------------------------------------------------------- # db query #---------------------------------------------------------- sub query { # Do database query my $self=shift; my $dbh=$self->param('dbh'); my $sth = $dbh->prepare(shift()); $sth->execute(); return $sth; }##END query ############################################################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best way to call DBI query
by gmax (Abbot) on Mar 14, 2002 at 15:18 UTC | |
by johannz (Hermit) on Mar 14, 2002 at 15:27 UTC | |
|
Re: Best way to call DBI query
by derby (Abbot) on Mar 14, 2002 at 15:10 UTC | |
by hakkr (Chaplain) on Mar 14, 2002 at 15:20 UTC | |
|
Re: Best way to call DBI query
by talexb (Chancellor) on Mar 14, 2002 at 14:43 UTC | |
|
Re: Best way to call DBI query
by rdfield (Priest) on Mar 14, 2002 at 15:03 UTC | |
|
Re: Best way to call DBI query
by MZSanford (Curate) on Mar 14, 2002 at 14:43 UTC | |
by strat (Canon) on Mar 14, 2002 at 14:52 UTC | |
by MZSanford (Curate) on Mar 14, 2002 at 14:58 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |