$sqlTotal="SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE hotel_id=3 AND updatetime BETWEEN '$start' AND '$end';";
$sqlTotal="SELECT count(1) total FROM sh_hotel_media_map_$spid WHERE $whereHotelid AND hm.status_inject=1 AND updatetime BETWEEN '$start' AND '$end';";
$totalArr=M("")->query($sqlTotal);
$totalArr=M("")->query($sqlTotal);
$total=0;
$total=0;
if(count($totalArr)>0){
if(count($totalArr)>0){
...
@@ -350,7 +359,7 @@ class CenterAction extends Action
...
@@ -350,7 +359,7 @@ class CenterAction extends Action
." FROM (SELECT hm.media_id,h.code,hm.status,hm.status_inject FROM sh_hotel_media_map_$spid hm,sh_hotel h"
." FROM (SELECT hm.media_id,h.code,hm.status,hm.status_inject FROM sh_hotel_media_map_$spid hm,sh_hotel h"
." WHERE hm.hotel_id=3 AND hm.status_inject=1 AND hm.updatetime BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
." WHERE $whereHotelid AND hm.status_inject=1 AND hm.updatetime BETWEEN '$start' AND '$end' AND h.id=hm.hotel_id ORDER BY hm.updatetime,hm.media_id ASC LIMIT $limit_from,$page_size) hm"
." JOIN sh_media_wasu mw ON mw.id=hm.media_id";
." JOIN sh_media_wasu mw ON mw.id=hm.media_id";
// echo $sql;exit;
// echo $sql;exit;
...
@@ -361,6 +370,7 @@ class CenterAction extends Action
...
@@ -361,6 +370,7 @@ class CenterAction extends Action