Dear all I had a table which store the user's Leave records. There ar two field in table that i had picked for the checking Process. 1: Leave_From, 2:Leave_To.
What i want to check is either Leave_From or Leave_To will not overlap between the Records in Database. I know it quit hard to understand what i want to do, so here is an example : Existing Records in Table: Name Staff Code Leave_From Leave_To Backup_Staff JACK 123 2002-01-15 2002-01-17 Someone User Input: Name Staff Code Leave_From Leave_To Backup_Staff May 234 2002-01-16 2002-01-18 Someone As you look at the Record input by user, you can find out that there is an overlap Entry on User Input's "Leave_From" field. It is in between the record in Existing Record's Date. 2002-01-15 -> 2002-01-16 <- 2002-01-17 I want to stop any record like this case insert to my table! Does anyone know how to Prevent it? -- Thx a lot! Jack [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php