> ####this uses binds, and does not work####
>
> #my $sth = $dbh->prepare( "SELECT * FROM demographics
> WHERE ? LIKE ?");
^^^
>
> #$sth->bind_param(1, $field);
>
> #$sth->bind_param(2, $text);
This doesn't work. You're asking the db to prepare a statement
without telling it the columns in the where clause. You'll need to
define the column at prepare time.
Tom
On Sat, May 19, 2001 at 10:21:46AM -0700, Robert Sherman wrote:
> ####this is the interpolated statement, which
> works####
>
> my $sql = "SELECT * FROM widgets WHERE $field LIKE
> $text";
--
Thomas A. Lowery
See DBI/FAQ http://tlowery.hypermart.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com