select * from from user,dead,payment where DATE_FORMAT(dead.dead_inform,'%Y-%m-%d') > DATE_FORMAT(user.register_date,'%Y-%m-%d' and user.user_id=dead.user_id and dead.dead_id!==payment.dead_id
select user.user_id from user as u
inner join dead as d
on u.user_id = d.user_id
inner join payment as p
on d.dead_id != p.dead_id
where d.dead_inform > u.register_date
select * from user.user_id from user as u inner join dead as d on u.user_id=d.user_id inner join payment as p on d.dead_id != p.dead_id where d.dead_inform > u.register_date
SELECT*
FROM user.user_id
FROM user AS u
INNERJOIN dead AS d ON u.user_id = d.user_id
INNERJOIN payment AS p ON d.dead_id != p.dead_id
WHERE d.dead_inform > u.register_date
LIMIT 0 , 30
MySQL แสดง:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from user as u inner join dead as d on u.user_id = d.user_id inner join payment ' at line 1
[/font]
from user inner join dead on user.user_id=dead.user_id inner join payment on dead.dead_id != payment.dead_id where dead.date_inform > user.register_date
select * from user inner join dead on user.user_id=dead.user_id inner join payment on dead.dead_id != payment.dead_id where dead.date_inform > user.register_date
เอา form ออกแล้วค่ะ ตอนนี้ใช้แบบนี้ค่ะ ไม่ติด Error แล้ว แต่ข้อมูลแสดงไม่ถูกต้อง มันไม่มีข้อมูลเลยทีนี้