]> git.mxchange.org Git - friendica.git/commitdiff
Use LIKE instead of REGEXP in api_search
authorPierre Rudloff <contact@rudloff.pro>
Mon, 18 Dec 2017 14:23:15 +0000 (15:23 +0100)
committerPierre Rudloff <contact@rudloff.pro>
Mon, 18 Dec 2017 14:23:15 +0000 (15:23 +0100)
include/api.php

index 39a1f0318554c087bec1befd6cbbe6c76bfbb551..c359c65f1ab2a7e1f3a064bbe2a00e567338453a 100644 (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)." ",