hi i have a schedule for each provider in data base mysql.for a week schedule like open time on monday to sunday or closing time of monday to sunday.now i want to show available time having a provider to display according to service choose by customer.i have the specfic service and businessID also.how can i divide the sloat for each day for provider.And the opening and closing time are saved in Db in Varchar format..please help if some one can. i will be greatfull to you .or atleast give some idea how to do this
A:
the opening and closing time are saved in Db in Varchar format
That's a big big big mistake. By storing times/dates in anything other than the natural date and datetime types in MySQL, you completely lose the ability to use MySQL's native date/time handling facilities, and will have to do all processing in your client-side code, or write hideously ugly queries to do so in MySQL. Either way, you'll be subjecting yourself to unecessary grief by using varchar instead of date or datetime
Marc B
2010-10-18 18:08:08