Use LIKE instead of REGEXP in api_search

This commit is contained in:
Pierre Rudloff 2017-12-18 15:23:15 +01:00
parent 5899d821ef
commit 02733c66f3

View file

@ -1526,7 +1526,7 @@ function api_search($type)
"SELECT ".item_fieldlists()."
FROM `item` ".item_joins()."
WHERE ".item_condition()." AND (`item`.`uid` = 0 OR (`item`.`uid` = ? AND NOT `item`.`global`))
AND `item`.`body` REGEXP ?
AND `item`.`body` LIKE CONCAT('%',?,'%')
$sql_extra
AND `item`.`id`>?
ORDER BY `item`.`id` DESC LIMIT ".intval($start)." ,".intval($count)." ",