I want to run a query that will perform a phrase search on all fields in
the table. I thought that it seemed really logical to write the statement
like:
my $dbh = DBI->connect('dbi:ODBC:database_name') || die DBI::errstr;
my $sth = $dbh->prepare("SELECT *
FROM table_name
WHERE * LIKE '%$in{'search term'}%'
ORDER BY name
");
$sth->execute();
while (($sid, $name)=$sth->fetchrow_array){
print qq~
....truncated...
~;
}
$dbh->disconnect();
But I am wrong.... miserably, terribly wrong. Perhaps this is off topic,
since it relates more to SQL than DBI, specifically, so please send any
replies directly to [EMAIL PROTECTED] How would one run a
phrase search across all the fields in a table? I am prepared for having
to type 96 OR's if I have to do so, but I am regretting it nonetheless. ;)
Thanks in advance.
Brad Smith