'Mysql Sentence take much time
I have 3 Tables:
News: Id,title,date
Tags : Id , name
News_Tag: id_tag , id_news
And I have a search function with a mysql sentence like this:
SELECT DISTINCT
news.title,
news.id,
FROM
news,
tags,
news_tag
WHERE
news.date > now()
AND (
news.title LIKE '%brasil%'
OR (
tags. NAME = 'brasil'
AND news_tag.id_news = news.id
)
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
