已关闭。此问题需要details or clarity。它目前不接受回答。
**希望改进此问题?**通过editing this post添加详细信息并阐明问题。
5小时前关闭
Improve this question的
`` $query =“SELECT t1.ID,t1.student_id,t1.Subject,t1.1st_Grading,t1.2nd_Grading,t1.3rd_Grading,t1.4th_Grading,t1.Status,SUM(t1.1st_Grading + t1.2nd_Grading + t1.3rd_Grading + t1.4th_Grading)/ 4 as Average FROM grading_system t1 LEFT JOIN studentdata t2 ON t1.student_Id = t2.ID GROUP BY t1.ID“;
Here's the result of this code and if you see the red arrow in url it's a student # 1 and inside it also includes student # 2 item
![](https://i.stack.imgur.com/5wS7h.png)
字符串
1条答案
按热度按时间hxzsmxv21#
当用户点击学生#1时,像这样在url中传递学生id
?id=1
,并使用全局变量$_GET['id']
在php中获取该id,并在查询中使用where子句,如下所示字符串