Advertisement
akozhomka

One news by id and lang_id

Apr 6th, 2022
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.29 KB | None | 0 0
  1. SELECT n.id
  2.      , tnt.title
  3.      , tntxt.text
  4.      , n.status
  5.      , n.date
  6. FROM news n
  7. LEFT JOIN translate_news_title tnt ON n.id = tnt.news_id AND tnt.lang_id = :LANG_ID
  8. LEFT JOIN translate_news_text tntxt ON n.id = tntxt.news_id AND tntxt.lang_id = :LANG_ID
  9. WHERE n.id = :NEWS_ID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement