|
|
|
@ -58,12 +58,13 @@ class infoTips_model extends CI_Model
|
|
|
|
|
|
|
|
|
|
public function search($keywords, $byWhat) {
|
|
|
|
|
$whereCodition = '';
|
|
|
|
|
|
|
|
|
|
if ($byWhat == 'byTitle') {
|
|
|
|
|
$whereCodition .= " and it.it_title like '%" . $keywords . "%'";
|
|
|
|
|
$whereCodition .= " and it.it_title like '%" . addslashes($keywords) . "%'";
|
|
|
|
|
} else if ($byWhat == 'byLabel') {
|
|
|
|
|
$whereCodition .= " and it.it_code like '%" . $keywords . "%'";
|
|
|
|
|
$whereCodition .= " and it.it_code like '%" . addslashes($keywords) . "%'";
|
|
|
|
|
} else if ($byWhat == 'byContent') {
|
|
|
|
|
$whereCodition .= " and it.it_content like '%" . $keywords . "%'";
|
|
|
|
|
$whereCodition .= " and it.it_content like '%" . addslashes($keywords) . "%'";
|
|
|
|
|
}
|
|
|
|
|
$searchText =
|
|
|
|
|
"select it.it_id ,it.it_title,it.it_expires,it.it_code,it.it_content,it.it_sitecode,it.it_datetime
|
|
|
|
|