//////////////////////////////$sq4=ขาด/คนที่ไม่ได้บันทึกข้อมูลในวันนั้นๆ///////////////////////////////
$sq4="select * from tbl_member where member_username not in (select date_member from tbl_date where date_date = CURRENT_DATE)";
////////////////////////////$sq5=คนที่มา/คนที่บันทึกข้อมูลในตารางลงเวลา////////////////////////////////
$sq5="select * from tbl_member where member_username in (select date_member from tbl_date where date_date = CURRENT_DATE)";
Tag : PHP
Date :
2020-01-28 19:37:45
By :
anzer112
View :
582
Reply :
1
No. 1
Guest
Code (SQL)
select 'คนขาด' as Type,* from tbl_member where member_username not in (select date_member from tbl_date where date_date = CURRENT_DATE)
union all
select 'คนมา' as Type,* from tbl_member where member_username in (select date_member from tbl_date where date_date = CURRENT_DATE)