If the user checks his rfid tag within 5 minutes of the last check the log does not record "check in" or "check out" but "error"
2013/9/4 António Ramos <[email protected]> > yes , stat is a string with "chech in" or "check out" i also have a > timestamp for the check in or check out. > > I dont want odd /even hours > > I want to know if the user is checked in > > I have an RFID app to check in /out outside workers via an rfid tag. > > when the user checks firstime, the app records "check in" , after that , > checking again his rfid tag the app logs "check out" . > > During the day the worker can go out to lunch and checks out, after lunck > checks in again. > > > so for a user i can have > > user a check in (time...) > user a check out (time...) > user a check in (time...) > > > I want to create a grid to show who is inside, so i need a query of odd > rfid checks for each user > > > > 2013/9/4 Richard Vézina <[email protected]> > >> Don't understand what you need exactly... Is stat a string type >> containing 'check in' or 'check out' and you want just odd number of record >> or you have an other field with timestamp or something and you want only >> the odd hours to appear in the grid?? >> >> Richard >> >> >> On Wed, Sep 4, 2013 at 12:54 PM, António Ramos <[email protected]>wrote: >> >>> >>> hello i need to use the sqlform.grid(query,etc... to show records >>> >>> *my problem* >>> the query is not just like >>> ((db.tab1.stat='check in')|(db.tab1.stat='check out')) >>> >>> >>> >>> i need to query only records that appear with stat='check in' or 'check >>> out' odd times in tab1 and not even times >>> >>> >>> For example , this should not be in the grid >>> >>> user a check in >>> user a check out >>> user a check in >>> user a check out >>> >>> >>> but this should >>> >>> user a check in >>> user a check out >>> user a check in >>> >>> >>> how do i create a query for this? to use in sqlform.grid(query, .... >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

