SELECT
DISTINCT concat(user.fname,' ',user.lname) as fullname ,
user.address, user.tel, user.email,
confirm_or.oid, confirm_or.date
FROM user , confirm_or
WHERE confirm_or.uid='vv123' AND user.uid=confirm_or.uid AND confirm_or.oid ='00016' ;
หรือ
Code
SELECT
DISTINCT concat(user.fname,' ',user.lname) as fullname ,
user.address, user.tel, user.email,
confirm_or.oid, confirm_or.date
FROM user INNER JOIN confirm_or
ON user.uid=confirm_or.uid AND confirm_or.uid='vv123' AND confirm_or.oid ='00016' ;