BMS-HOSxP Community

HOSxP => การเขียน SQL Script => ข้อความที่เริ่มโดย: piyarat ที่ พฤศจิกายน 26, 2020, 14:18:02 PM

หัวข้อ: ต้องการให้ line notify แจ้งเตือนกันลบ Visit รายวัน
เริ่มหัวข้อโดย: piyarat ที่ พฤศจิกายน 26, 2020, 14:18:02 PM
select concat((select count(modifytype) from ksklog   where  logtime between "2020-11-25 00:00:01" and  "2020-11-25 23:59:59"
and modifytype="Delete"   and detail like "%cause%" ),' คน')as Day

คำสั่งนี้มันกำหนดให้เป็นปัจจุบันไม่ได้ค่ะ ใช้กับ HIS Line Notify โปรแกรมแจ้งเตือนผ่าน Lin Notify ค่ะ
หัวข้อ: Re: ต้องการให้ line notify แจ้งเตือนกันลบ Visit รายวัน
เริ่มหัวข้อโดย: chitvichai ที่ พฤศจิกายน 28, 2020, 14:20:01 PM
select concat((select count(modifytype) from ksklog   where  logtime between "2020-11-25 00:00:01" and  "2020-11-25 23:59:59"
and modifytype="Delete"   and detail like "%cause%" ),' คน')as Day

คำสั่งนี้มันกำหนดให้เป็นปัจจุบันไม่ได้ค่ะ ใช้กับ HIS Line Notify โปรแกรมแจ้งเตือนผ่าน Lin Notify ค่ะ
ลองใช้ Code นี้แทนนะครับ
โค๊ด: [Select]
select concat((select count(modifytype) from ksklog   where  logtime between concat(curdate()," 00:00:01") and  concat(curdate()," 23:59:59")
and modifytype="Delete"   and detail like "%cause%" ),' คน')as Day
หัวข้อ: Re: ต้องการให้ line notify แจ้งเตือนกันลบ Visit รายวัน
เริ่มหัวข้อโดย: piyarat ที่ พฤศจิกายน 29, 2020, 10:15:52 AM
ขอบคุณค่ะ