Guest User

Untitled

a guest
Mar 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. [
  2. {
  3. "id": 1,
  4. "translations": {
  5. "ru": {
  6. "translation": "русский перевод",
  7. "approved": true
  8. },
  9. "en": {
  10. "translation": "english translation",
  11. "approved": false
  12. }
  13. }
  14. },
  15. {
  16. "id": 2,
  17. "translations": {
  18. "ru": {
  19. "translation": "русский перевод",
  20. "approved": true
  21. }
  22. }
  23. }
  24. ]
  25.  
  26. SELECT translation FROM table2 LEFT JOIN table1 USING(id) WHERE lang_code = "en" AND approved = true;
Add Comment
Please, Sign In to add comment