Jump to content

SELECT on a calendar table


jimfog

Recommended Posts

I have created a calendar table where it contains all the dates of 2015 plus the holidays and I want to do the following:

 

I want to find if holidays exist for the current week...is this possible...using the date object maybe?

 

And obviously I will have to use SELECT statement for the calendar....

 

I hope you understand what I mean.

 

 

Link to comment
Share on other sites

You need to send a query that contains a date range in the WHERE clause. How you do that depends on how you decided to store the dates.

This is what I had in my mind too...thanks

Link to comment
Share on other sites

There is one thing that bothers me though...do you think the implementation should be JS based or PHP based?

Link to comment
Share on other sites

I'm not sure why you have two threads on this same topic...

 

http://w3schools.invisionzone.com/index.php?showtopic=53454&hl=

 

...nor do I understand your last question -- do you mean Php vs. Php+AJAX?

They are relevant...not the same.

Link to comment
Share on other sites

 

 

...nor do I understand your last question -- do you mean Php vs. Php+AJAX?

let me explain...

Ajax based solution:

The result of the select statement is returned from the server as JSON....and js cript handles the rest-DOM manipulation.

 

PHP-based solution:

PHP is embedded in the markup to handle the result of the SELECT statement.

 

I opted for the second solution for simplicity sake despite the fact that much code in my app is js(backbone)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...