View Full Version : how to display a table weekly/daily/monthly and yearly?
11-06-2012, 01:17 PM
i want to display a table where the user can choose from weekly daily monthly yearly settings for displaying data in the table
11-06-2012, 04:07 PM
Okay, and what's your question? Use a select or a radio button to determine which is selected.
11-06-2012, 05:53 PM
fou-lu my master xD my question is how can i display the date in my database and show it in weekly daily or monthly for example i have
number of cargo
they are all in one table i want to be able to display them either weekly daily or monthly according to the user all of the columns have many data inside them now i just want all of the date to be sorted when the user views them either daily monthly or weekly like a grid or like a excel kind of table
11-06-2012, 07:17 PM
This can be done with simple WHERE clauses in SQL. If you want for a specific date, you would query where a date is on a specific day. Using BETWEEN syntax tends to make it a lot easier, ie: WHERE mydatefield BETWEEN ('2012-08-14', '2012-08-21').
PHP wise you just need to allow the user to input the date range.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.