Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2012
    Location
    Philippines
    Posts
    35
    Thanks
    5
    Thanked 0 Times in 0 Posts

    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

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Okay, and what's your question? Use a select or a radio button to determine which is selected.

  • #3
    New Coder
    Join Date
    Jul 2012
    Location
    Philippines
    Posts
    35
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •