|
|
|
@ -56,6 +56,22 @@ class infoTips_model extends CI_Model
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function search($keywords) {
|
|
|
|
|
$keywordList = explode(" ", $keywords);
|
|
|
|
|
$whereCodition = '';
|
|
|
|
|
foreach ($keywordList as $keyword) {
|
|
|
|
|
$whereCodition .= ' and '.$keyword;
|
|
|
|
|
}
|
|
|
|
|
$searchText =
|
|
|
|
|
"select it.it_id ,it.it_title,it.it_expires,it.it_code,it.it_content,it.it_sitecode,it.it_datetime
|
|
|
|
|
from infoTips it
|
|
|
|
|
where it.it_sitecode=?"
|
|
|
|
|
. $whereCodition
|
|
|
|
|
. "order by it_expires ASC";
|
|
|
|
|
// $query = $this->HT->query($searchText, array($this->config->item('site_code')));
|
|
|
|
|
echo $this->HT->query_string($searchText, array($this->config->item('site_code')));
|
|
|
|
|
// return $query->result();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function add($table, $data)
|
|
|
|
|
{
|
|
|
|
|