SELECT `id` FROM `object` obj
JOIN `category` cat ON obj.`id` = obj2.`obj`
JOIN `obj2cat` obj2 ON obj2.`cat` = cat.`tid`
WHERE (
MATCH(cat.`title`) AGAINST (?)
OR
MATCH(obj.`title`) AGAINST (?)
)
SELECT `id` FROM `object` obj WHERE MATCH(obj.`title`) AGAINST (?) or tid in (SELECT `tid` FROM `category` cat
JOIN `obj2cat` obj2 ON obj2.`cat` = cat.`tid` -- мог неверно понять вашу структуру
WHERE MATCH(cat.`title`) AGAINST (?) )
where field1 = :const or field2 = :const or field3 = :const
mysql> CREATE TABLE usercsscache ((емнип, просто дефолтная установка из штатного репозитория)
-> userid INT UNSIGNED NOT NULL DEFAULT '0',
-> cachedcss TEXT,
-> buildpermissions INT UNSIGNED NOT NULL DEFAULT '0',
-> PRIMARY KEY (userid)
-> ) ENGINE = InnoDB;
Query OK, 0 rows affected (0.23 sec)
mysql> select version();
+------------------+
| version() |
+------------------+
| 5.5.40-0+wheezy1 |
+------------------+
1 row in set (0.02 sec)
mysql>
select fieldname /*, ... */ from tablename order by 1
select fieldname /*, ... */ from tablename order by fieldname
select IF(name='denis', 1,0) as sortfield, /*fields*/ from tablename order by sortfield