Jump to content

Archived

This topic is now archived and is closed to further replies.

dent_moosely

Show last 60 days...

Recommended Posts

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...

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.