I have two tables:
links
| id | ...
1
2
...
clicks
| linkid | userid | click_date |
1 | 2 | ...
4 | 2 | ...
5 | 3 | ...
When users clicks a link from links it is added to clicks.
I want to use MySQL query to return only links that user hasn’t clicked – the pair linkid:userid isn’t contained in the table or click_date (secs from Unix epoch) was yesterday in GMT.
1 Answer