Merge branch 'master' of github.com:hainatravel/information-system

master
赵鹏 8 months ago
commit a1fe542b7d

@ -1,45 +1,49 @@
<?php
class Information_model extends CI_Model {
var $topNum = false;
var $orderBy = false;
var $search_title = false;
var $search_url = false;
var $search = false;
var $path = false;
var $level = false;
var $is_parent_id = false;
var $is_id_array = false;
var $ic_url_is_id = false;
class Information_model extends CI_Model
{
var $topNum = false;
var $orderBy = false;
var $search_title = false;
var $search_url = false;
var $search = false;
var $path = false;
var $level = false;
var $is_parent_id = false;
var $is_id_array = false;
var $ic_url_is_id = false;
var $ic_ht_area_type = false;
var $ic_ht_area_id = false;
var $ic_type = false;
var $ic_id = false;
var $ic_ht_area_id = false;
var $ic_type = false;
var $ic_id = false;
function __construct() {
function __construct()
{
parent::__construct();
$this->HT = $this->load->database('INFORMATION', TRUE);
$this->HT = $this->load->database('INFORMATION', TRUE);
$this->HT229 = $this->load->database('HT', TRUE);
}
function init() {
$this->topNum = false;
$this->orderBy = " ORDER BY ic_datetime DESC ";
$this->search_title = false;
$this->search_url = false;
$this->search = false;
$this->path = false;
$this->level = false;
$this->is_parent_id = false;
$this->is_id_array = false;
$this->ic_url_is_id = false;
function init()
{
$this->topNum = false;
$this->orderBy = " ORDER BY ic_datetime DESC ";
$this->search_title = false;
$this->search_url = false;
$this->search = false;
$this->path = false;
$this->level = false;
$this->is_parent_id = false;
$this->is_id_array = false;
$this->ic_url_is_id = false;
$this->ic_ht_area_type = false;
$this->ic_ht_area_id = false;
$this->ic_id = false;
$this->ic_ht_area_id = false;
$this->ic_id = false;
}
function get_last_edit_list($topNum = 24) {
function get_last_edit_list($topNum = 24)
{
$this->init();
$this->topNum = $topNum;
return $this->GetList();
@ -49,23 +53,25 @@ class Information_model extends CI_Model {
* 信息搜索
* 添加根据产品编码搜索条件OR ic_id in (select im_ic_id from infoMetas where im_key='meta_product_code' and convert(nvarchar(100),im_value) like N'$sql_keyword') 2025.9.2 zp
*/
function search($keyword) {
function search($keyword)
{
$this->init();
$this->topNum = 48;
if (is_numeric($keyword)) {
$this->search_title = "AND ic_id=" . $this->HT->escape($keyword);
} else {
$sql_keyword = '%' . $this->HT->escape_like_str($keyword) . '%';
$sql_keyword = '%' . $this->HT->escape_like_str($keyword) . '%';
$old_keyword = $this->HT->escape_like_str($keyword); //用来搜索产品编码
$this->search_title = "AND (ic_url_title like N'$sql_keyword' OR ic_title like N'$sql_keyword' OR ic_id in (select im_ic_id from infoMetas where im_key='meta_product_code' and convert(nvarchar(100),im_value) = N'$old_keyword') )";
}
return $this->GetList();
}
function search_all_text($keyword, $topnum = 24) {
function search_all_text($keyword, $topnum = 24)
{
$this->init();
$this->topNum = $topnum;
$sql_keyword = '%' . $this->HT->escape_like_str($keyword) . '%';
$sql_keyword = '%' . $this->HT->escape_like_str($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'
@ -74,36 +80,39 @@ class Information_model extends CI_Model {
}
//根据关键词来搜索内容
function search_by_words($url, array $words, $exclude_ids) {
function search_by_words($url, array $words, $exclude_ids)
{
$this->init();
$this->topNum = 1;
$sql_keyword = ' AND ( 1=1 ';
$sql_keyword = ' AND ( 1=1 ';
foreach ($words as $item) {
$sql_keyword .= " AND ic_title like '%" . $this->HT->escape_like_str(trim($item)) . "%' ";
}
$sql_keyword .= ' ) ';
$this->search = " AND ic_status=1 AND ic_url LIKE '$url%' " . $sql_keyword . ' AND is_id NOT IN(' . implode(',', $exclude_ids) . ',0)';
$this->search = " AND ic_status=1 AND ic_url LIKE '$url%' " . $sql_keyword . ' AND is_id NOT IN(' . implode(',', $exclude_ids) . ',0)';
$this->orderBy = " ORDER BY is1.is_level ASC, is1.is_sort ASC,ic_datetime DESC ";
return $this->GetList('ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status,ic.ic_photo');
}
//在当前节点下搜索关键词
function search_by_words_2($path, array $words, $exclude_ids) {
function search_by_words_2($path, array $words, $exclude_ids)
{
$this->init();
$this->topNum = 1;
$sql_keyword = ' AND ( 1=1 ';
$sql_keyword = ' AND ( 1=1 ';
foreach ($words as $item) {
$sql_keyword .= " AND ic_title like '%" . $this->HT->escape_like_str(trim($item)) . "%' ";
}
$sql_keyword .= ' ) ';
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->search = ' AND ic_status=1 AND is_id NOT IN(' . implode(',', $exclude_ids) . ',0) ' . $sql_keyword;
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->search = ' AND ic_status=1 AND is_id NOT IN(' . implode(',', $exclude_ids) . ',0) ' . $sql_keyword;
$this->orderBy = " ORDER BY is1.is_level ASC, is1.is_sort ASC,ic_datetime DESC ";
return $this->GetList('ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status,ic.ic_photo');
}
//在同级别下随机获取N条数据并且排除某些id
function random($topnum, $is_path, array $exclude_ids) {
function random($topnum, $is_path, array $exclude_ids)
{
$this->init();
$this->topNum = $topnum;
$this->search = " AND is1.is_path LIKE '$is_path%' ";
@ -115,7 +124,8 @@ class Information_model extends CI_Model {
}
//在urls列表里面随机获取N条数据并且排除某些id
function random_range($topnum, array $url_array, array $exclude_ids) {
function random_range($topnum, array $url_array, array $exclude_ids)
{
$this->init();
$this->topNum = $topnum;
$this->search = ' AND ( 1=2 ';
@ -130,31 +140,34 @@ class Information_model extends CI_Model {
}
//根据url搜索信息
function search_url($url) {
function search_url($url)
{
$this->init();
$this->topNum = 24;
$this->topNum = 24;
$this->search_url = ' AND ic_url= ' . $this->HT->escape($url);
return $this->GetList();
}
//根据根节点路径获取子节点列表
function get_list_by_path($path, $level = false, $site_code = false, $filed = false) {
function get_list_by_path($path, $level = false, $site_code = false, $filed = false)
{
$this->init();
if ($level !== false) {
$this->level = " AND is1.is_level= '$level' ";
}
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
return $this->GetList($filed, $site_code);
}
//根据根节点路径获取子节点列表
function get_list_by_path_gm($path, $level = false, $site_code = false, $filed = false) {
function get_list_by_path_gm($path, $level = false, $site_code = false, $filed = false)
{
$this->init();
if ($level !== false) {
$this->level = " AND is1.is_level= '$level' ";
}
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->path = " AND is1.is_path LIKE '$path%' ";
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
return $this->GetList_gm($filed, $site_code);
}
@ -162,51 +175,52 @@ class Information_model extends CI_Model {
/**
* 获取当前页面的面包屑,不包括当前节点
*/
function get_path_exclude_self($is_id, $path) {
$site_code = $this->config->item('site_code');
function get_path_exclude_self($is_id, $path)
{
$site_code = $this->config->item('site_code');
$path_query = $this->HT->query("select
ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status
from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id
where is_id in ($path 0) and is_id <> ? and is_siteCode = ? order by is_level asc", [$is_id, $site_code]);
$path_result = $path_query->result();
$path_list = [];
$path_list = [];
$group_map = [
278008010 => [
'ic_url' => '/travelguide/culture/',
'ic_url' => '/travelguide/culture/',
'ic_url_title' => 'Chinese Culture',
],
278008011 => [
'ic_url' => '/travelguide/',
'ic_url' => '/travelguide/',
'ic_url_title' => 'Travel Guide',
],
278008012 => [
'ic_url' => '/aboutus/',
'ic_url' => '/aboutus/',
'ic_url_title' => 'About Us',
],
278008013 => [
'ic_url' => '/citytour/',
'ic_url' => '/citytour/',
'ic_url_title' => 'City Tours',
],
278008014 => [
'ic_url' => '/tour/',
'ic_url' => '/tour/',
'ic_url_title' => 'China Tours',
],
];
foreach ($path_result as $path_row) {
$ic_url = $path_row->ic_url;
$ic_url = $path_row->ic_url;
$ic_url_title = $path_row->ic_url_title;
if ($path_row->is_level === 0) {
if (array_key_exists($path_row->is_id, $group_map)) {
$top_group = $group_map[$path_row->is_id];
$top_group = $group_map[$path_row->is_id];
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_url_title' => $top_group['ic_url_title'],
];
$path_list[] = $path_array;
@ -214,10 +228,10 @@ class Information_model extends CI_Model {
} else if ($path_row->ic_status === 1) {
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_url_title' => $path_row->ic_url_title,
];
$path_list[] = $path_array;
@ -230,27 +244,28 @@ class Information_model extends CI_Model {
/**
* 获取当前页面的面包屑,不包括当前节点
*/
function get_breadcrumb_data($is_id, $path, $group_map) {
function get_breadcrumb_data($is_id, $path, $group_map)
{
$path_query = $this->HT->query("select
ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status
from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id
where is_id in ($path 0) and is_id <> ? order by is_level asc", [$is_id]);
$path_result = $path_query->result();
$path_list = [];
$path_list = [];
foreach ($path_result as $path_row) {
$ic_url = $path_row->ic_url;
$ic_url = $path_row->ic_url;
$ic_url_title = $path_row->ic_url_title;
if ($path_row->is_level === 0) {
if (array_key_exists($path_row->is_id, $group_map)) {
$top_group = $group_map[$path_row->is_id];
$top_group = $group_map[$path_row->is_id];
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_url_title' => $top_group['ic_url_title'],
];
$path_list[] = $path_array;
@ -258,10 +273,10 @@ class Information_model extends CI_Model {
} else if ($path_row->ic_status === 1) {
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_url_title' => $path_row->ic_url_title,
];
$path_list[] = $path_array;
@ -272,34 +287,38 @@ class Information_model extends CI_Model {
}
//根据路径获取某一级别节点详细页
function get_detail_by_path($path, $level) {
function get_detail_by_path($path, $level)
{
$this->init();
$this->topNum = 1;
$this->level = " AND is1.is_level= '$level' ";
$this->topNum = 1;
$this->level = " AND is1.is_level= '$level' ";
$this->is_id_array = " AND is1.is_id IN ($path 0) ";
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
return $this->GetList();
}
//根据节点ID列表获取信息
function get_detail_by_ids($is_ids) {
function get_detail_by_ids($is_ids)
{
$this->init();
$this->is_id_array = " AND is1.is_id IN ($is_ids) ";
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
return $this->GetList();
}
//根据根节点ID获取子节点列表
function get_list_by_id($is_parent_id, $level = false) {
function get_list_by_id($is_parent_id, $level = false)
{
$this->init();
if ($level !== false) {
$this->level = " AND is1.is_level= '$level' ";
}
$this->is_parent_id = " AND is1.is_parent_id = '$is_parent_id' ";
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,is1.is_path ASC ';
return $this->GetList('is1.is_id, ic.ic_id, ic.ic_url, ic.ic_url_title, ic.ic_title, ic.ic_datetime, ic.ic_author');
}
function Detail($ic_url_is_id, $filed = '', $site_code = '') {
function Detail($ic_url_is_id, $filed = '', $site_code = '')
{
if (empty($ic_url_is_id)) {
return false;
}
@ -313,17 +332,19 @@ class Information_model extends CI_Model {
return $this->GetList($filed, $site_code);
}
function detail_by_ic_id($ic_id) {
function detail_by_ic_id($ic_id)
{
if (empty($ic_id)) {
return false;
}
$this->init();
$this->topNum = 1;
$this->topNum = 1;
$this->ic_url_is_id = " AND ic.ic_id = " . $this->HT->escape($ic_id);
return $this->GetList();
}
function GetList($filed = "", $site_code = "") {
function GetList($filed = "", $site_code = "")
{
$this->topNum ? $sql = "SELECT TOP " . $this->topNum : $sql = "SELECT ";
if (empty($filed)) {
$sql .= " is1.is_id, \n"
@ -402,7 +423,8 @@ class Information_model extends CI_Model {
}
}
function GetList_gm($filed = "", $site_code = "") {
function GetList_gm($filed = "", $site_code = "")
{
$this->topNum ? $sql = "SELECT TOP " . $this->topNum : $sql = "SELECT ";
if (empty($filed)) {
$sql .= " is1.is_id, \n"
@ -482,7 +504,8 @@ class Information_model extends CI_Model {
}
//根据区域信息获取根节点
function GetRoot($ic_ht_area_type, $ic_ht_area_id) {
function GetRoot($ic_ht_area_type, $ic_ht_area_id)
{
$sql = "SELECT TOP 1 is1.is_id, \n"
. " is1.is_parent_id, \n"
. " is1.is_path, \n"
@ -508,15 +531,16 @@ class Information_model extends CI_Model {
}
//根据信息树id获取省份代号
public function get_province_by_isid($is_id) {
public function get_province_by_isid($is_id)
{
$sql = " SELECT top 1 CII_PRI_SN
FROM infoStructures is1
INNER JOIN infoContents ic ON ic.ic_id = is1.is_ic_id
INNER JOIN CItyInfo ON ic.ic_ht_area_id=CII_SN
WHERE is1.is_id=?";
$query = $this->HT->query($sql, [$is_id]);
$query = $this->HT->query($sql, [$is_id]);
$result = $query->result();
if (! empty($result)) {
if (!empty($result)) {
return $result[0]->CII_PRI_SN;
} else {
return false;
@ -524,7 +548,8 @@ class Information_model extends CI_Model {
}
//获取结构列表
function StructureList($is_id) {
function StructureList($is_id)
{
$sql = "SELECT is1.is_id AS id, \n"
. " is1.is_parent_id AS pId, \n"
. " ISNULL(ic.ic_url_title,'New Information') AS name , \n"
@ -545,7 +570,8 @@ class Information_model extends CI_Model {
}
//检测链接是否重复
function URLcheck($is_id, $ic_url) {
function URLcheck($is_id, $ic_url)
{
$sql = "SELECT TOP 1 is1.is_id \n"
. "FROM infoStructures is1 \n"
. " INNER JOIN infoContents ic ON ic.ic_id = is1.is_ic_id \n"
@ -562,7 +588,8 @@ class Information_model extends CI_Model {
}
//获取没有绑定的景点列表
function get_unlink_landscape_list($city_id) {
function get_unlink_landscape_list($city_id)
{
$sql = "SELECT TOP 8 lsi.LSI_SN, \n"
. " lsi.LSI_City, \n"
. " lsi2.LSI2_Name, \n"
@ -588,29 +615,32 @@ class Information_model extends CI_Model {
}
//获取根节点列表
function root_type_list() {
function root_type_list()
{
$this->init();
$this->orderBy = " ORDER BY ic.ic_url_title ASC ";
$this->level = " AND is1.is_level=1 ";
$this->orderBy = " ORDER BY ic.ic_url_title ASC ";
$this->level = " AND is1.is_level=1 ";
$this->is_parent_id = " AND is1.is_parent_id=0 ";
$this->ic_type = " AND ic.ic_type='root' ";
$this->ic_type = " AND ic.ic_type='root' ";
return $this->GetList();
}
//获取某个信息类型详情
function get_type_detail($type_name, $area_type, $area_id) {
function get_type_detail($type_name, $area_type, $area_id)
{
$this->init();
$this->topNum = 1;
$this->orderBy = " ORDER BY is1.is_level ASC ";
$this->topNum = 1;
$this->orderBy = " ORDER BY is1.is_level ASC ";
$this->ic_ht_area_type = " AND ic.ic_ht_area_type= " . $this->HT->escape($area_type);
$this->ic_ht_area_id = " AND ic.ic_ht_area_id=" . $this->HT->escape($area_id);
$this->ic_type = " AND ic.ic_type= " . $this->HT->escape($type_name);
$this->ic_ht_area_id = " AND ic.ic_ht_area_id=" . $this->HT->escape($area_id);
$this->ic_type = " AND ic.ic_type= " . $this->HT->escape($type_name);
return $this->GetList();
}
//获取3年未更新的信息
function get_oldest_info($yeardiff = 3, $has_no_pub = true, $empty_info = true) {
$has_no_pub ? $sql_no_pub = '' : $sql_no_pub = "AND ic_status = 1";
function get_oldest_info($yeardiff = 3, $has_no_pub = true, $empty_info = true)
{
$has_no_pub ? $sql_no_pub = '' : $sql_no_pub = "AND ic_status = 1";
$empty_info ? $sql_empty_info = '' : $sql_empty_info = "AND datalength(ic_content) > 0";
//sql
$sql = "SELECT
@ -638,9 +668,10 @@ class Information_model extends CI_Model {
}
//ct
function ct_get_by_url($ic_url, $webcode) {
function ct_get_by_url($ic_url, $webcode)
{
$this->ic_url_is_id = " AND ic.ic_url = N" . $this->HT->escape($ic_url);
$sql = "SELECT is1.is_id, \n"
$sql = "SELECT is1.is_id, \n"
. " is1.is_parent_id, \n"
. " is1.is_path, \n"
. " is1.is_level, \n"
@ -685,9 +716,10 @@ class Information_model extends CI_Model {
}
//获取分组列表
function group_list() {
function group_list()
{
$this->init();
$this->search = ' AND is_level<=1 ';
$this->search = ' AND is_level<=1 ';
$this->orderBy = ' ORDER BY is1.is_level ASC, is1.is_sort ASC,ic.ic_title ASC,is1.is_path ASC ';
return $this->GetList();
}
@ -695,34 +727,35 @@ class Information_model extends CI_Model {
/**
* CT 获取当前页面的面包屑,不包括当前节点,去除链接为空及不发布的节点
*/
function get_path_exclude_ct($is_id, $path) {
$site_code = $this->config->item('site_code');
function get_path_exclude_ct($is_id, $path)
{
$site_code = $this->config->item('site_code');
$path_query = $this->HT->query("select
ic_id, is_id, ic_url,ic_url_title,ic_title,is_path,is_level,ic_status
from infoStructures a inner join infoContents b on a.is_ic_id=b.ic_id
where is_id in ($path 0) and is_id <> ? and is_siteCode = ? order by is_level asc", [$is_id, $site_code]);
$path_result = $path_query->result();
$path_list = [];
$path_list = [];
$group_map = [
278013869 => [
'ic_url' => '/tour',
'ic_url' => '/tour',
'ic_url_title' => 'China Tours',
],
278014282 => [
'ic_url' => '/citytour',
'ic_url' => '/citytour',
'ic_url_title' => 'China City Tours',
],
278013862 => [
'ic_url' => '/daytrip',
'ic_url' => '/daytrip',
'ic_url_title' => 'China Day Trip',
],
278014609 => [
'ic_url' => '/china-trains',
'ic_url' => '/china-trains',
'ic_url_title' => 'China Trains',
],
278014608 => [
'ic_url' => '/china-flights',
'ic_url' => '/china-flights',
'ic_url_title' => 'China Flights',
],
];
@ -730,21 +763,21 @@ class Information_model extends CI_Model {
foreach ($path_result as $path_row) {
if (array_key_exists($path_row->is_id, $group_map)) {
$top_group = $group_map[$path_row->is_id];
$top_group = $group_map[$path_row->is_id];
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $top_group['ic_url'],
'ic_url_title' => $top_group['ic_url_title'],
];
$path_list[] = $path_array;
} else if ($path_row->ic_status === 1) {
$path_array = [
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_id' => $path_row->ic_id,
'is_id' => $path_row->is_id,
'ic_title' => $path_row->ic_title,
'ic_url' => $path_row->ic_url,
'ic_url_title' => $path_row->ic_url_title,
];
$path_list[] = $path_array;
@ -757,18 +790,20 @@ class Information_model extends CI_Model {
/**
* intl 根据keywords获取信息。
*/
function list_by_keywords($site, $keywords) {
function list_by_keywords($site, $keywords)
{
$this->init();
$keysql = '';
foreach ($keywords as $key) {
$keysql .= ' OR ic_content like \'%' . $key . '%\'';
$keysql .= ' OR ic_url like \'%' . $key . '%\'';
$keysql .= ' OR ic_photo like \'%' . $key . '%\'';
// $keysql .= ' OR m1.im_value like \'%' . $key . '%\'';
// $keysql .= ' OR m2.im_value like \'%' . $key . '%\'';
$safeStr = $this->HT->escape_str($key);
$keysql .= ' OR ic_content like \'%' . $safeStr . '%\'';
$keysql .= ' OR ic_url like \'%' . $safeStr . '%\'';
$keysql .= ' OR ic_photo like \'%' . $safeStr . '%\'';
// $keysql .= ' OR m1.im_value like \'%' . $safeStr . '%\'';
// $keysql .= ' OR m2.im_value like \'%' . $safeStr . '%\'';
}
$search = ' AND (1=0 ' . $keysql . ')';
$sql = "
$sql = "
SELECT is_id, ic_id, ic_url, ic_content, ic_photo
FROM infoStructures is1
INNER JOIN infoContents ic

Loading…
Cancel
Save