Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-06-2012, 01:17 PM   PM User | #1
juslai
New Coder

 
Join Date: Jul 2012
Location: Philippines
Posts: 35
Thanks: 5
Thanked 0 Times in 0 Posts
juslai is an unknown quantity at this point
how to display a table weekly/daily/monthly and yearly?

i want to display a table where the user can choose from weekly daily monthly yearly settings for displaying data in the table
juslai is offline   Reply With Quote
Old 11-06-2012, 04:07 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Okay, and what's your question? Use a select or a radio button to determine which is selected.
Fou-Lu is offline   Reply With Quote
Old 11-06-2012, 05:53 PM   PM User | #3
juslai
New Coder

 
Join Date: Jul 2012
Location: Philippines
Posts: 35
Thanks: 5
Thanked 0 Times in 0 Posts
juslai is an unknown quantity at this point
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

route
destination
number of cargo
revenue

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
juslai is offline   Reply With Quote
Old 11-06-2012, 07:17 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:15 AM.


Advertisement
Log in to turn off these ads.