Got a query like that:
UPDATE trails SET route = '$route', distance = '$distance', desc = '$description' WHERE route='$route'
It’s returning this error:
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc = 'Bla bla bla' WHERE route='London to Dublin'' at line 1
Thanks!.
first :
escape your variables like that
and try this :
obs :
descis reserved keyword for mysql , so use other word or make backticks for it.