php / mysql - select id from one table excepting ids which are in second table

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2011-01-16T13:46:07Z Indexed on 2011/01/16 13:53 UTC
Read the original article Hit count: 263

Filed under:
|

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 )?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql