http://qs321.pair.com?node_id=195825


in reply to MySQL Like Statement and case sensitivity

Here is another way to use placeholders. This can be more readable when you have lots of them. I would like to second the motion that 'SELECT *' is a bad thing. Always specify what you want to retrieve.
$query = "SELECT * FROM items WHERE description LIKE ? OR longdescri +ption LIKE ?"; $sth = $dbh->prepare($query); $sth->bind_param(1, $search); $sth->bind_param(2, $search); unless ($sth->execute()) { die $dbh->errstr() }
mr greywolf