How to bind LIKE values using the PDO extension?
You could also say: SELECT wrd FROM tablename WHERE wrd LIKE CONCAT(:partial, ‘%’) to do the string joining at the MySQL end, not that there’s any particular reason to in this case. Things get a bit more tricky if the partial wrd you are looking for can itself contain a percent or underscore character (since … Read more