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

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -