|
|
|
@ -263,16 +263,42 @@ class Api_model extends CI_Model {
|
|
|
|
|
* @Date Changed:
|
|
|
|
|
*/
|
|
|
|
|
function getGuideList($old_pid,$new_pid){
|
|
|
|
|
|
|
|
|
|
$sql = " select top 1 ic_url from dbo.infoContents
|
|
|
|
|
inner join infoStructures on ic_id=is_ic_id
|
|
|
|
|
where is_id = ? ";
|
|
|
|
|
|
|
|
|
|
$query = $this->HT->query ($sql ,array($new_pid));
|
|
|
|
|
|
|
|
|
|
if ($query->num_rows()>0){
|
|
|
|
|
$url = $query->row()->ic_url;
|
|
|
|
|
}else{
|
|
|
|
|
$url = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($url==""){$url="nourl";}
|
|
|
|
|
|
|
|
|
|
////原来读取旧信息数据
|
|
|
|
|
// SELECT ic_url,ic_url_title,ic_photo
|
|
|
|
|
// ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
|
|
|
|
|
// ,'2' as sortby
|
|
|
|
|
// FROM dbo.infoContents
|
|
|
|
|
// inner join infoStructures on ic_id=is_ic_id
|
|
|
|
|
// WHERE is_sitecode='ct'
|
|
|
|
|
// and ic_status=1
|
|
|
|
|
// and is_parent_id = ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sql = "
|
|
|
|
|
select * from (
|
|
|
|
|
SELECT ic_url,ic_url_title,ic_photo
|
|
|
|
|
,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
|
|
|
|
|
select * from (
|
|
|
|
|
SELECT ic_url,ic_url_title,ic_photo
|
|
|
|
|
,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
|
|
|
|
|
,'2' as sortby
|
|
|
|
|
FROM dbo.infoContents
|
|
|
|
|
inner join infoStructures on ic_id=is_ic_id
|
|
|
|
|
WHERE is_sitecode='ct'
|
|
|
|
|
WHERE is_sitecode='chinatravel'
|
|
|
|
|
and ic_status=1
|
|
|
|
|
and is_parent_id = ?
|
|
|
|
|
and ic_url like ?
|
|
|
|
|
|
|
|
|
|
UNION ALL
|
|
|
|
|
|
|
|
|
@ -287,9 +313,8 @@ class Api_model extends CI_Model {
|
|
|
|
|
) allbt
|
|
|
|
|
order by sortby
|
|
|
|
|
|
|
|
|
|
";
|
|
|
|
|
|
|
|
|
|
$qurey = $this->HT->query($sql,array("-1",$new_pid));
|
|
|
|
|
";
|
|
|
|
|
$qurey = $this->HT->query($sql,array($url."/%",$new_pid));
|
|
|
|
|
return $qurey->result();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|