php / mysql - select id from one table excepting ids which are in second table
- by John
hello.
for example i have 2 tables:
1 . users:
id Name
1 Mike
2 Adam
3 Tom
4 John
5 Andy
6 Ray
2 . visits:
userID date
1 ...
3 ...
6 ...
i want to make a page which can be visited once in 12 hours, when user visits that page his id is included in database ( visits ), how i can select all users ( from database users) excepting users who visited page in <= 12 hours ( users from database visits )?