1. 程式人生 > >destoon獲取最新被收藏統計數量的調用方法

destoon獲取最新被收藏統計數量的調用方法

destoon get num 統計 des where content oba and

在api/extend.func.php文件中加入下面的函數

function xh_favorite($mid,$itemid){
global $db;
$nums = $db->get_one("SELECt COUNT(*) AS num FROM {$db->pre}favorite WHERe mid=‘$mid‘ and tid=‘$itemid‘");
return $nums[‘num‘] ;
}

列表調用標簽 {xh_favorite($mid,$t[itemid])}

內容頁調用標簽 {xh_favorite($mid,$itemid)}

destoon獲取最新被收藏統計數量的調用方法