-
Bug
-
Resolution: Resolved
-
Major
-
None
-
3.1.10
-
None
Having an underscore in the sql_like_expression() fails. The underscore ends up being double escaped (in MySQL, not sure about other DBMs).
It is escaped in the sql_like_expression() function itself. Then it gets escaped again by the sql_escape() function.
For example,
$db->sql_like_expression('foo_' . $db->get_any_char())
|
Results in a bad MYSQL error:
LIKE 'FOO\\_%'
|
To work it must be:
LIKE 'FOO\_%'
|