I have just done my site live . Below is the simple query; it works fine on my localhost but not on the live server.
select * from friends where action='chating'
It gives error “you have to use right syntax near where”.
Please help me: why this happening, and how do I solve it?
I guess your mysql version is different on local and live. Please check it.
I am sure it’s
Mysql5.5on live in whichACTIONis new Reserved Keyword. SO while if you using it as column name then you need to use bacticks(`) around it while using in query.Try below :