How to combine these three sql queries into one?
Posted
by
lam3r4370
on Stack Overflow
See other posts from Stack Overflow
or by lam3r4370
Published on 2010-12-25T17:35:00Z
Indexed on
2010/12/25
17:53 UTC
Read the original article
Hit count: 175
How to combine these two sql queries into one?
SELECT DISTINCT * FROM rss WHERE MATCH(content,title) AGAINST ('$filter')
SELECT COUNT(content) FROM rss WHERE MATCH(content,title) AGAINST ('$filters')
And if the result is 0 from the above query
-
SELECT DISTINCT * FROM rss WHERE content LIKE '%$filters%' OR title LIKE '%$filters%';
$filter .= $row['filter'];
$filters = $row['filter'];
$filters may be more than one keyword
© Stack Overflow or respective owner