View Single Post
  #11 (permalink)  
Old 11-25-09, 06:24 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Instead of using REPLACE on the WHERE - you might want to use REGEXP.

MySQL :: MySQL 5.0 Reference Manual :: 11.4.2 Regular Expressions

In this case, you could try:

$sQuery=preg_replace("[^A-Za-z0-9]", "", $entry);

with

... WHERE `model` REGEXP '.$sQuery ...
Reply With Quote