select SQL_CALC_FOUND_ROWS
cats.*, (select COUNT(*) from `cats` cats2 where cats2.pid = cats.id) as __childs
from `cats` cats
where
0=0
order by cats.`sort` desc, cats.`name`
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)