Reverted last changes in Sql.SEARCH statement back to using “like” insted of regular expressions

This commit is contained in:
Tobi Schäfer 2010-02-06 17:20:52 +00:00
parent e0d45711b6
commit da47d03b24

View file

@ -165,8 +165,7 @@ Sql.PURGEREFERRERS = "delete from log where action = 'main' and " +
/** @constant */ /** @constant */
Sql.SEARCH = "select id from content where site_id = $0 and " + Sql.SEARCH = "select id from content where site_id = $0 and " +
"prototype in ('Story', 'Comment') and status <> 'closed' and " + "prototype in ('Story', 'Comment') and status <> 'closed' and " +
"(metadata regexp 'title:\"[^\"]*$1[^\"]*\"' or " + "(metadata like '%title:\"%$1%\"%' or metadata like '%text:\"%$1%\"%') " +
"metadata regexp 'text:\"[^\"]*$1[^\"]*\"') " +
"order by created desc limit $2"; "order by created desc limit $2";
/** @constant */ /** @constant */