条件是: 某版块的某分类信息的数据
某个板块下的可以显示的分类信息(可用)
function get_threadclass($fid){ $threadtypes = C::t('forum_forumfield')->fetch($fid); $threadtypes = dunserialize($threadtypes['threadtypes']); foreach(C::t('forum_threadclass')->fetch_all_by_fid($fid) as $type) { if(isset($threadtypes['types'][$type['typeid']])) { $return[]=$type; } } return $return; }
某个板块下的可以显示的分类信息(可用)
function get_threadclass($fid){ $threadtypes = C::t('forum_forumfield')->fetch($fid); $threadtypes = dunserialize($threadtypes['threadtypes']); foreach(C::t('forum_threadclass')->fetch_all_by_fid($fid) as $type) { if(isset($threadtypes['types'][$type['typeid']])) { $return[]=$type; } } return $return; }discuz中的表有一点很让人闹心,那就是很多表中的字段没有关联性,都是独立的,所以无法做出关系条件来
某个板块下的可以显示的分类信息(可用)
function get_threadclass($fid){ $threadtypes = C::t('forum_forumfield')->fetch($fid); $threadtypes = dunserialize($threadtypes['threadtypes']); foreach(C::t('forum_threadclass')->fetch_all_by_fid($fid) as $type) { if(isset($threadtypes['types'][$type['typeid']])) { $return[]=$type; } } return $return; }pre_forum_thread里的字段typeid就是分类信息的id
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号