Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. +----+-------+-------+--------------+--------------+
  2. | id | mood1 | mood2 | mood1_visual | mood2_visual |
  3. +----+-------+-------+--------------+--------------+
  4. | 1 | 5 | 7 | 5c | 7a |
  5. | 2 | 5 | 7 | 5b | 7b |
  6. | 3 | 5 | 7 | 5c | 7d |
  7. | 4 | 5 | 8 | 5a | 8a |
  8. | 5 | 5 | 7 | 5c | 7a |
  9. | 6 | 5 | 8 | 5b | 8a |
  10. +----+-------+-------+--------------+--------------+
  11.  
  12. (`mood1_visual`='5c' AND `mood2_visual`='7a') OR
  13. (`mood1`=5 AND `mood2`=7 AND (`mood1_visual`<>'5c' OR `mood2_visual`<>'7a'))
  14.  
  15. (`mood1_visual`='5c' AND `mood2_visual`='7a')
  16.  
  17. ORDER BY THE ONES THAT MATCH CONDITION FIRST THEN THE OTHERS ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement