SELECT
A.STUDENTNO AS '学号',
A.NAME AS '姓名',
A.CLASSNO AS '班级',
A.AGE AS '年龄',
A.SEX AS '性别',
A.ADDRESS AS '家庭地址',
A.PHOTO AS '照片',
B.ID AS '序号',
B.STUDENTNO AS '学号',
B.COURSE AS '科目',
B.GRADE AS '成绩'
FROM B.CourseGrage,A.STUDENTINFO
——懂了吧!
A. NAME AS '姓名',
FROM
CourseGrage A,
-- left/right/inner join
STUDENTINFO B
-- on A.X = B.X
where -- ...
AS后面不需要加引号 SELECT A.STUDENTNO AS 学号
FROM 后面跟一个表,可以用LEFT JOIN 或者别的方式关联两个表
别名可以不加引号,另外FROM 后面应该是CourseGrage B,STUDENTINFO A,再加上WHERE A.STUDENTNO=B.STUDENTNO
-----------
STUDENTINFO A
left
CourseGrage B
on A.STUDENTNO = B.STUDENTNO
WHERE A.STUDENTNO ='{$NO}'
这是学号参数。完全的数据库新手,建议先学会写sql语句,再学怎么加参数