i have a function which gets all the newly registered users, and displays it depending on the filter given whether it is newly registered by month or by year.
on this example i am using year, i have this sql
Select date_registered from users where date_registered > '2011-12-31 12:59:59' AND date_registered < '2013-01-01 12:00:00'
so this will result in all date_registered
registered for the year 2012
the question is how to be more dynamic that i may apply a filter for example
where date_registered > $dynamic_date and date_registered < $dynamic_date
or any good advise how to achieve this better.
thanks . .