I am attempting to use the LIKE clause in a mysql statement as follows:
SELECT * FROM batches WHERE FilePath LIKE '%Parker_Apple_Ben_20-10-1956%'
The data matched data within the 'FilePath' Column is:
C:\SCAN\Parker_Apple_Ben_20-10-1830\TEST
The above SQL statement works fine and picks up the relevent row, but if I for example add the "\" character into the end of the LIKE clause (like follows) it does not pick up the row correctly:
SELECT * FROM batches WHERE FilePath LIKE '%Parker_Apple_Ben_20-10-1956\%'
Funnily enough though if I place a '\' character at the beginning of LIKE clause (like follows) it picks up the row perfectly fine - this has me baffled.
SELECT * FROM batches WHERE FilePath LIKE '%\Parker_Apple_Ben_20-10-1956%'