mysql - How to select all items which the user didn't vote for yet (vote system) -
I have three tables:
Video: ID, name, path ... User: ID, name, ... like: id, user_id, video_id, ...
I want to select all the videos where my user did not vote.
I have tried:
SELECT `videos`. * Where 'id' does not select from 'video' (select 'Video_ID' where 'likes'. 'Yer_id' is not '1') Rand () ASC limit 10 by order
I should also mention that my user can only see 10 items at a time, randomly selected, so I ordered them randomly and limited it to 10.
Can anyone help me?
Try it which is not existing
:
Select the video. * From where it is not present (from where choice of choice prefers 1. video = ID and choice.asser_id = USER_ID)
Comments
Post a Comment