select distinct 232 as parent_id, pa.*
from link_category as pa,
link_category as ch
where ch.id in(select distinct category_id from link_url_category)
and pa.start<=ch.start and ch.finish<=pa.finish
and pa.deep=2
and 0Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'library2.pa.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
( ! ) Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in /var/www/ebooks/scripts/lib/functions.php on line 107