I have a table named as Attendance
, Here is the structure given below.
id fname lname roll_no date time
________________________________________________________
1 Qadir Hussain 08cs18 19/04/2013 8:45am
2 Qadir Hussain 08cs18 19/04/2013 8:50am
_______________________________________________________
i want to insert the record having roll_no = 08cs18
only one time per day. not more than once per day.
I can restrict this via if/else
. but is it possible to restrict this via sqlite query?
Edit
Acctually i m making an app of studnets attendance, I m using the QR_code to scan encoded roll_no. once a student scan its card for the first time it should insert the record (i.e id = 1) if user again scan it on the same day it should not insert. means a particular student should have a attendance record only one time per day.