mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-24079 blog now using new sql_like()
This commit is contained in:
parent
88bb11eb55
commit
c014d57c4f
2 changed files with 4 additions and 6 deletions
|
@ -1143,10 +1143,9 @@ class blog_filter_search extends blog_filter {
|
|||
|
||||
public function __construct($searchterm) {
|
||||
global $DB;
|
||||
$ilike = $DB->sql_ilike();
|
||||
$this->conditions = array("(p.summary $ilike ? OR
|
||||
p.content $ilike ? OR
|
||||
p.subject $ilike ?)");
|
||||
$this->conditions = array("(".$DB->sql_like('p.summary', '?', false)." OR
|
||||
".$DB->sql_like('p.content', '?', false)." OR
|
||||
".$DB->sql_like('p.subject', '?', false).")");
|
||||
$this->params[] = "%$searchterm%";
|
||||
$this->params[] = "%$searchterm%";
|
||||
$this->params[] = "%$searchterm%";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue