SHOW:
|
|
- or go back to the newest paste.
1 | SET @id = 1; | |
2 | ||
3 | SELECT news.* | |
4 | FROM news, cats | |
5 | - | ((SELECT cats.cat_id FROM cats WHERE cats.cat_id = 1) = cats.cat_id) OR |
5 | + | |
6 | - | ((SELECT cats.subcat_to FROM cats WHERE cats.cat_id = 1) = cats.cat_id) OR |
6 | + | |
7 | - | ((SELECT cats.subsubcat_to FROM cats WHERE cats.cat_id = 1) = cats.cat_id) |
7 | + | ((SELECT cats.cat_id FROM cats WHERE cats.cat_id = @id) = cats.cat_id) OR |
8 | ((SELECT cats.subcat_to FROM cats WHERE cats.cat_id = @id) = cats.cat_id) OR | |
9 | ((SELECT cats.subsubcat_to FROM cats WHERE cats.cat_id = @id) = cats.cat_id) | |
10 | ) | |
11 | ) |