Jump to content


Photo

Show last 60 days...


  • Please log in to reply
1 reply to this topic

#1 dent_moosely

dent_moosely
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 26 July 2004 - 01:54 PM

I have a page that shows records of bank teller tickets ordered for a printing company. They only want the last 60 days to show on a "Status" page the bank reviews. I have a "Date In" field for when the order is placed. I assume I would use the "Date In" field to filter the info but I am not sure how...

I know that I can use "Repeat Regions" tool set to "60" but I want to only show 10 records per page... and that just shows the last 60 records and not based on the last 60 days that may have more or less records over the given time...

The project is based on PHP and Mysql using Dreamweaver tools.

Any directions would help since I am not great in this area...

#2 dent_moosely

dent_moosely
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 27 July 2004 - 11:58 AM

nailed it:

SELECT *
FROM slip_orders
WHERE DATE_SUB(CURDATE(),INTERVAL 60 DAY) <=sort_date
ORDER BY sort_date DESC


"slip_orders" being the table and "sort_date" being the DATE field in Mysql db...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users