Greetings andrew,
I think what you're wanting is to use LIKE's wild-card character.
$sth = $dbh->prepare(q{ SELECT * FROM items WHERE description LIKE ? OR longdescription LIKE ? }); $sth->execute('%' . $search . '%', '%' . $search . '%') or die $dbh->e +rrstr;
Notes: Placeholders are your friend. (a.k.a. bind values) Always use them.
gryphon
code('Perl') || die;
In reply to Re: MySQL Like Statement and case sensitivity
by gryphon
in thread MySQL Like Statement and case sensitivity
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |