Hi, Arlex,
I just ran the SQL's in phpMyAdmin from Cpanel directly and there doesn't seem to be any error, which means the information my hosting service gave me may be incorrect. It may well be a case where there are security restrictions with running SQL from standalone phpMyAdmin installs.
Please see below the SQL's I ran and the results shown for each. Based on this, how best do you think this can be resolved? If this require Cpanel access, could you remote to my machine so that we can do this together?
Many thanks again for the help!
SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` , '1' AS level, COUNT( b.`id` ) AS `discussioncount` , (
SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` ASC
LIMIT 20
SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` , '1' AS level, COUNT( b.`id` ) AS `discussioncount` , (
SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` DESC
LIMIT 20
SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` , '1' AS level, COUNT( b.`id` ) AS `discussioncount` , (
SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` ASC
LIMIT 20