|
-
Feb 17th, 2018, 08:33 PM
#2
Re: Making an error message for the repeating in or out if loops in the database tabl
You use an If statement. It's really that simple. The state of the data should tell you whether the last action was an entrance or an exit. When the student scans at the entrance you query the database and IF there last action was an entrance then you display the message. Likewise, when they scan at the exit you display the message IF there last action was an exit.
How you represent the last action in the data is up to you. Maybe you have a Boolean column where True is entrance and False is exit. Maybe you have a date/time for the last entrance and exit so you simply have to check which is greater. Maybe you have something else. You designed it so you should know how to use it to determine what the last action was. IF the current action matches the last action, display the message.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|