select * from 学生表 a,教师表 b,教师学生关系表 c where a.studentid = c.studentid and b.teacherid = teacherid and b.teacherid = 你要查的老师id
解决方案 »
- php中,显示时如何将同一个人同一天的两条记录合为一条,将签退时间和签到时间显示在同一行?
- PHP 出力PDF时折行(有全角空格)
- CE找基址问题
- 求高手推荐适合新手学习的优秀php整站源码
- 怎样避免刷新后数据再次被提交
- 对大数据文档怎么进行合理的分页?采用分割字数、设置分页标志,都会遇到一个问题:如<table><tr><td>内容一{Page}内容二</td></tr></tab
- 急招PHP程序员
- 字符转换问题
- 论坛出现乱码怎么办?急!急!急!!!
- PHP通过ODBC连接SQLSERVER2005 查询不了中文
- PHP如何判断多维数组中是否包含空值
- wampserver 低版本怎么安装扩展模块
table teacher
id name
1 A
2 Btable student
id tid
1 1
2 1
3 1
4 2
5 2
6 2A老师的学生
select * from student where tid=1;B老师的学生
select * from student where tid=2;