php - MATCH AGAINST unknown column -
i have problems searching method, i'm using match against because it's better like. example have database full of cities , when type city name (for example moscow) in input field, there error "unknown column 'moscow' in 'where clause'". have 2 columns in database, city_id , city_name
my sql query looks this
"select city_name default_cities match(city_name) against($city)"
if have suggestions i'll appreciated :)
"select city_name default_cities match(city_name) against('$city')"
use quotes $city
edit
don't forget escape it. (for ex. "l'amour")
Comments
Post a Comment