获取当前用户的视频收藏列表,可用于判断,是否已经收藏该影片
下面是PHP代码
$h2_ufav_where=array();
$h2_ufav_where['user_id'] = $GLOBALS['user']['user_id'];
$h2_ufav_where['ulog_type'] = 2;
$h2_ufav_data = model('Ulog')->listData($h2_ufav_where,'ulog_id desc',1,9999);
foreach ($h2_ufav_data['list'] as $k => $v) {
if($v['ulog_mid'] == 1){
$h2_ufav_vlist[] = $v['ulog_rid'];
}elseif($v['ulog_mid'] == 2){
$h2_ufav_alist[] = $v['ulog_rid'];
}elseif($v['ulog_mid'] == 3){
$h2_ufav_tlist[] = $v['ulog_rid'];
}
}
$h2_ufav_vlist = array_unique($h2_ufav_vlist);//视频
$h2_ufav_alist = array_unique($h2_ufav_alist);//文章
$h2_ufav_tlist = array_unique($h2_ufav_tlist);//专题