* Nils Valentin > I have problems understanding why the below two commands would > return the same result. [...] > mysql> select * from sensei where link like > '/var/www/html/xoops/2003\'s sum'; [...] > mysql> select * from sensei where last_name like > '/var/www/html/xoops/2003\\\'s sum'; [... > Note the three backslashes and the single backsplash (after the 2003) > > I understood the first sample looks for ...2003's.... and the > second one for ...2003\'s..... or am I wrong ?
They both look for "2003's". The LIKE operator is a pattern matching operator. The operand is evaluated twice: first by the parser, and then when the pattern matching is performed. For your last example, the first evaluation changes "2003\\\'s" to "2003\'s", and the second evaluation changes "2003\'s" to "2003's". <URL: http://www.mysql.com/doc/en/String_comparison_functions.html > -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]