I am trying to search for any rows that contain %20 in my database via phpmyadmin. Here’s my query:
select * from `jos_picmicro_content` where `introtext` like '\%20' escape '\';
Except it returns the following error:
#1064 - 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 ''\'' at line 1
What have I done wrong?
You’ve escaped the
'. The correct syntax is:In order to identify the problem quickly, divide your query to different rows, e.g.:
Then MySQL will alert at which row the problem is.