工作中遇到的一個(gè)問(wèn)題,如何獲得欄目下的模型,現(xiàn)在代碼分享出來(lái),供大家學(xué)習(xí)
獲得模型數(shù)據(jù)庫(kù)
$siteids = getcache('category_content', 'commons');
$MODEL = getcache('model', 'commons');
$siteid = $siteids[$catid];
$CATEGORYS = getcache('category_content_'.$siteid, 'commons');
$category = $CATEGORYS[$catid];
$modelid = $category['modelid'];
$this->content_db->set_model($modelid);
$tablename = $this->content_db->db_tablepre.$MODEL[$modelid]['tablename'];
新聞熱點(diǎn)
疑難解答
圖片精選