我正在尝试使用table(six_attendance, five_attendance)
通过INNER JOIN
从table(users)
获取数据。这是我尝试过的:
$query = mysql_query("SELECT *
FROM
(users
INNER JOIN six_attendance
ON users.username = six_attendance.username)
INNER JOIN five_attendance
ON users.username = five_attendance.username
WHERE six_attendance.username OR five_attendance.username ='$reg_no'");
答案 0 :(得分:0)
$query = mysql_query("SELECT *
FROM
users
INNER JOIN six_attendance
ON users.username = six_attendance.username
INNER JOIN five_attendance
ON users.username = five_attendance.username
WHERE six_attendance.username='$reg_no' OR five_attendance.username ='$reg_no'");