in reply to Re: DBI Question
in thread DBI Question

The value I will bind to the placeholder is SCALAR variable. Can this still be done like:
$sth = $dbh->prepare("SELECT name FROM people WHERE name LIKE ?"); $sth->execute( "$foo\%" );

Replies are listed 'Best First'.
Re: Re: Re: DBI Question
by jreades (Friar) on Jan 17, 2001 at 03:15 UTC

    You'll have to test it for yourself, but I don't see why not...

    An easier way, if you know that you're always doing wildcard searches, might be:

    $sth->execute('%' . $foo . '%');
      That helps alot...Thanks!!!