三张表
题目表topic,字段 to_id to_title
知识点表tag,字段t_id t_title
关联表relation,字段to_id t_id
每个题目可以有多个知识点
现web界面提供搜索框,每页10个小题,用户可以多选知识点,遇到的问题是,有重复的数据的
select topic.to_id,topic.to_title from topic,relation where ( topic.to_id = relation.to_id ) and (t_id in (1,2,3));
select distinct( topic.to_id,topic.to_title) from topic,relation ,tag where ( topic.to_id = relation.to_id ) and (t_id in (1,2,3)) limit 0,10;
用group by
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号