Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select * from questions
- left join responses on responses.QuestionId = questions.id
- where responses.username <> 'username string' or responses.username is null
- order by rand() limit 1;
- _sequelize.query(
- 'select * from questions ' +
- 'left join responses on responses.QuestionId = questions.id ' +
- 'where responses.username <> "' + req.query.name + '" or responses.username is null ' +
- 'order by rand() ' +
- 'limit 1',
- {model : models.Responses})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement