I’m currently developing an app with a vote feature. I would like people not to sign in and make it simple, so I collect the IP after every vote. With this feature the IP will never vote on the same thing again.
But I find it hard to SELECT a voting, that hasn’t been voting by the IP. I’ve tried this:
SELECT * FROM messages
WHERE state = '-1'
AND id != (SELECT message_id FROM log WHERE ip = '$ip')
How do I do this correctly?
If I understood you correctly – this query should help you: