1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-01 21:27:55 +02:00

[ticket/10630] Use sql_like_expression() method instead of hardcoded LIKE '%x%'

PHPBB3-10630
This commit is contained in:
Joas Schilling 2012-02-20 02:16:41 +01:00
parent afcf9cbc86
commit ef154b78a1

@ -295,7 +295,7 @@ class search_backend
$sql_where = '';
foreach ($authors as $author)
{
$sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\'';
$sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char);
}
$sql = 'SELECT search_key