Last active
August 29, 2015 13:56
-
-
Save dead23angel/9029382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
news.title, | |
news.slug, | |
news.datetime, | |
news.content, | |
news.category_id, | |
news.tags | |
FROM | |
public.tagging_tag, | |
public.tagging_taggeditem, | |
public.news | |
WHERE | |
tagging_tag.id = tagging_taggeditem.tag_id AND | |
tagging_taggeditem.object_id = news.id AND | |
tagging_tag.name = 'тест' AND --ищем по тегу тест | |
tagging_taggeditem.content_type_id = 9; --равно 9 ибо это ид таблицы новостей | |
Суммарное время выполнения запроса: 11 ms. | |
2 строки получено. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment