Friday, April 15, 2011

MySQL query gotcha!

Example:
SELECT * FROM `modx_listvalues` WHERE listvalue like '%_'

like '%_' will result in having all records selected.
Instead, use this
like '%\_'


No comments: