Hi...
I'm making a "Hot or Not" system in asp and MySQL, and I'm having problems selecting posts that people have not voted for earlier.
I hope this info is enough...
I got two tables:
PICTURES - Fields: pid (picture id) | gender (gender of the person on the picture)
VOTES - Fiels: vid (vote id) | pic (picture id) | uid (user id of the person voting, random generated and called from a cookie.. i.e. vbgpnuxhebtdkkbnncdfeorsyjevhj) | rating (rating 1-10)
Now.. what I want to dois to only select post that have not been voted for earlier.. And I tried to do it like this:
Conn.Execute("SELECT * FROM pictures, votes WHERE ((pictures.pid != votes.pid) || (votes.uid != '" & strUserId &"')) && (pictures.gender = '"& strGender &"')")
But it doesn't work.. I always get the same id out..
I Hope this info is enough.. Otherwise ask and I'll provide all u need..
Thank you so much!! I Worked like 15 hours on this stupid line.. lol
All the best from Copenhagen..
I'm making a "Hot or Not" system in asp and MySQL, and I'm having problems selecting posts that people have not voted for earlier.
I hope this info is enough...
I got two tables:
PICTURES - Fields: pid (picture id) | gender (gender of the person on the picture)
VOTES - Fiels: vid (vote id) | pic (picture id) | uid (user id of the person voting, random generated and called from a cookie.. i.e. vbgpnuxhebtdkkbnncdfeorsyjevhj) | rating (rating 1-10)
Now.. what I want to dois to only select post that have not been voted for earlier.. And I tried to do it like this:
Conn.Execute("SELECT * FROM pictures, votes WHERE ((pictures.pid != votes.pid) || (votes.uid != '" & strUserId &"')) && (pictures.gender = '"& strGender &"')")
But it doesn't work.. I always get the same id out..
I Hope this info is enough.. Otherwise ask and I'll provide all u need..
Thank you so much!! I Worked like 15 hours on this stupid line.. lol
All the best from Copenhagen..