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

enter image description here

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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -