I have a user table, where users need to be approved, i want to show users who are not approved and is registered more than 7 days ago.
My user_regdate is a timestam
Try this;
select * from users WHERE DATE_SUB(user_regdate,INTERVAL 7 DAY) AND approved='0' order by id;