I have semester table with
sem_id, startmonth, startyear, endmonth , endyear, acadamic year, course fields
I want to do validation to check if the semester user is entering falls within existing semester duration.
For ex:I have in database SemI starts June2010 and ends in dec2010
and one user is trying to enter semII starts nov2010 and end in may2011
then i need to give warning to user that semester II cant start before jan2011
thanks in advance for help
Well to me there are number of ways for doing this task, I think the most easiest way to do this task is to give the user only options to select those months which have semesters, means only show him those months which are valid, do not show the others, Like you’ve semesters starting in June2010 and ending in Dec2010, Why you would like a user to enter other months and then prompt him, rather provide him in drop down the only semester months, hope this solves your problem.