全文搜索增加图片链接

webht/payment
Jimmy Liow 2 years ago
parent 09d418d838
commit 91329d4a0e

@ -67,7 +67,10 @@ class Information_model extends CI_Model
$this->init();
$this->topNum = $topnum;
$sql_keyword = '%' . $this->HT->escape_like_str($keyword) . '%';
$this->search = " AND ic_content like N'$sql_keyword' ";
$this->search = " AND (ic_content like N'$sql_keyword'
or ic.ic_photo like N'$sql_keyword'
or map.im_value like N'$sql_keyword'
or mapm.im_value like N'$sql_keyword')";
return $this->GetList();
}
@ -371,6 +374,8 @@ class Information_model extends CI_Model
$sql .= ",0 as amp_status ";
$sql .= "FROM infoStructures is1 \n"
. " INNER JOIN infoContents ic ON ic.ic_id = is1.is_ic_id \n"
. " left JOIN infoMetas map on ic.ic_id = map.im_ic_id AND map.im_key = 'meta_addon_picture' \n"
. " left JOIN infoMetas mapm on ic.ic_id = mapm.im_ic_id AND mapm.im_key = 'meta_addon_picture_mobile' \n"
. " AND ic.ic_sitecode = is1.is_sitecode \n"
. "WHERE is1.is_sitecode = ? ";
$this->search_title ? $sql .= $this->search_title : false;

Loading…
Cancel
Save