function dr_function_test($data) {
$now = array();
foreach ($data['return'] as $t) {
$t['thumb'] = dr_get_file($t['thumb']); // 圖片完整地址
$now[] = array(
'id' => $t['id'],
'thumb' => $t['thumb'],
'title' => $t['title'],
'content' => 怎么直接獲取到該id對應的內容?
);
}
return $now;
}
問題1,在資訊等只有一級的查詢中,能不能不再通過action=content第二次提交才能獲取content內容;
問題2,在視頻等有兩級的查詢中,能不能一次性直接獲取第一級的content和第二級的分集內容?
如果問題2沒法解決,則在APP接口中,如何獲取視頻的分集內容?
http://apdwn.com/v3doc/231.html
用這個接口,然后自定義函數(shù),在函數(shù)里面用ci的語法查詢數(shù)據(jù),再返回結果
function dr_test() { $ci = &get_instance(); return $ci->db->from($this->db->dbprefix(SITE_ID.'_news').' AS a') ->join($this->db->dbprefix(SITE_ID.'_news_data_0').' AS b', 'a.id=b.id', 'left') ->get()->result_array(); }這個是查詢全部news表和附表一起返回