A bit of brainstorming is required.
We are building a booking system that allows users to book a date and a half an hour time slot on that day. Some days however based on a weekly timetable will not be available and others may be unavailable at certain time.
What would be the best way to go about something like this. There should be some information in the database saying what day of the week certain times are not available but I am not sure what the best way of going about this is.
Any ideas?
Marvellous
Related
not sure if this is possible to do but...
i have a follow function on my cms and would like a form of 'trending' posts that would allow me to show the posts that have gained the most followers over the past 7 days or so.
If i have a way of counting the amount of followers for today, is there a way i can check it against a past amount?
Or whats the best way around this? should i possibly be creating a script that will run a query on all the blogs, count there followers and store that in a DB field? I would make this happen every 7 days and run a check against this number and then the current follower amount?
Is this possibly over complicating things?
Thanks, Craig.
It looks like you are headed towards a Cron Job that will run periodically
If i have a way of counting the amount of followers for today, is there a way i can check it against a past amount?
Yes, save your data in a table just for this purpose. Then setup a script that checks this special table in your database where the stats are kept, and chooses the top ones. This table get's updated everyday, say at 00:00. With the data saved, you may query it to find out as much as you're saving in it
TLDR: this is kind of a project in itself, but I'm no expert
I have a question regarding Date and Time for MYSQL. Basically I started building a comments section for a web project I have going on. I was building out the DB table and wanted to know how the DB stores the date and time.
For instance if I am in LA and the time is 7:00 PM will it store the comment at 7PM and say that I am from New York obviously and I see the comment its 10 PM so what time will I see the 7PM that wouldnt really make sense. I am wondering how you solve this problem and differentiate between different time-zones.
I am imagining that the server has its own time zone associated with it so all time is delineated from that which would make things a whole lot easier. But is it right that a person sees their time from a post as 10PM when it was made at 7PM. This is all very confusing to me. Any information on how to regularly deal with this issue or if I have one at all will be greatly appreciated. I am building my site using PHP and Codeigniter.
I personally just store the times in the database under an INT ( 11 ) and use the native PHP time() function to get the time, and then you can convert this into a nicer format of a date using some of the PHP functions http://php.net/manual/en/function.date.php you can get the year, month, day, hour, minute, etc.
You then can easily just add or subtract the # of hours (3600 seconds in an hour) depending on the time zone. May be an easier way to do this, but this is how I am currently doing it :)
Ask the user their timezone and adjust times accordingly.
Show the timezone with the date ("9pm ET")
Do what StackOverflow does, and say "2 mins ago".
I need to create an interface where a user needs to select how many times his magizine/newspaper gets distributed. Some magazines/newspapers get distributed
Several times a week.
Several times a a month: --either by day (e.g. every second tuesday) or by date (e.g. on the 1st, 10th and 28th)
Several times a year.
Once the frequency has been chosen, I need to add additional information to each frequency item. e.g. if the user chose weekly on Mondays and Fridays, I need to add additional information for Monday and separate information for Friday.
Does anyone have any ideas on how to do this? Or where I can read more or get some examples?
I'm using PHP and javascript/jquery for this application.
Thanks in advance.
You would need to ask the end user a series of questions, and use jquery to display to next set of questions for the next set of results etc
My website involves scheduling recurring lessons and events. At present I have built a table using php and javascript which scans through my mysql DB, time slot by timeslot, day by day to see if there is an event scheduled or if the timeslot is free.
It works fine, but is quite clunky and ugly and to be honest, not user friendly enough. I have now built the rest of the site using JQuery along with php, JS, HTML.
I have searched far and wide for a JQuery module to sort me out for this, but every calendar/scheduler I find is for ongoing time, i.e. like the Outlook Calendar.
I want one that ONLY displays Monday - Sunday, with time intervals of a half hour - what's the best way for me to achieve this?
Many thanks in advance,
Brett
may be this can be of help if you haven checked it out already https://github.com/robmonie/jquery-week-calendar/wiki/
I'm working on a web application that automates a reservation process using the Google Calendar API and PHP. When the user first selects a date, my script creates a "tentative" event on the Calendar to prevent other users from trying to select the same date. However, to avoid the proliferation of tentative dates created by users that don't follow through, I want to impose a time limit on the transaction process, so that if the user leaves the app or takes too long, the tentative date will be removed from the calendar (and thus available for other users to reserve).
We're currently storing the appointments in a MySQL db as well as the Google Cal, so here's my current strategy: when the tentative appointment is first created, store the tentative appointment in the db with a timestamp. Then, schedule a cron job (maybe every hour or so) that scans through the database and removes tentative reservations based on the age of their timestamp (removing them from both the db and the google cal).
In theory, this should work. However, my question is this: is there a simpler/more elegant way to do this that I'm not thinking of? Does anyone have a better solution to this problem?
Not sure if this is "better", but if the primary goal is limiting clutter you could cap the number of tentative events during a given time period and have your cron job delete all but the newest N during each period. This way the calendar can't get choked if you have a sudden rush of tentative events, but you can keep them around longer when there's less activity giving people a larger window to confirm their reservation during slow periods.
When someone tries to create an appointment at the same time as a tentative appointment, check to see if the tentative appointment is "too old". If it is: delete it and create the new one. If it isn't: tell the user an appointment is already being created at that time.