On 31 Oct 2007 at 0:00, Jeff Pang wrote:

> 
> 
> -----Original Message-----
> >From: Beginner <[EMAIL PROTECTED]>
> >Sent: Oct 31, 2007 9:20 PM
> >To: beginners@perl.org, beginners@perl.org
> >Subject: impatient DBI query
> >
> >Hi,
> >
...snip
> 
> try something like this:
> 
>     my $dbh = DBI->connect(...);
>     my $str = 'select foo from bar where foo like ?';
>     my $sth = $dbh->prepare($str);
>     $sth->execute('baz%') or die $dbh->errstr;
>     my @results = $sth->fetchrow_array;
>     $sth->finish;

Of course. Put it into execute. Thanx Jeff.
Dp.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to