MySQL: finding number of days different

While working on an invoice system, I want to project a list of invoices that are overdue for certain amount of days, or a list of invoices that are going to be due in certain amount of days. Instead of implementing the filtering in PHP code, I am thinking to let MySQL query performs the filtering.

The datediff seems is not my solution, it just doesn’t work out for my MySQL. Hence I come across with this solution from this source http://mysql-tips.blogspot.com/2005/04/mysql-difference-between-dates-in.html. It is pretty simple and clean.

SELECT * FROM invoices WHERE (TO_DAYS(now())-TO_DAYS(inv_duedate)) > 0