Jump to content
Sign in to follow this  

Страница lastcomments и запрещенные категории

Recommended Posts

DLE 12.

Если у группы пользователей запрещен доступ (или открыт) в определенные категории, то он получит ошибку:

Unknown column 'dle_post.category' in 'where clause'



(SELECT id FROM " . PREFIX . "_comments " . $where . " ORDER BY id desc LIMIT ".$fromcstart.", ".intval($config['comm_nummers'])." ) as sub

Имеем запрос:

(SELECT id FROM dle_comments WHERE dle_post.category NOT REGEXP '[[:<:]](3)[[:>:]]' ORDER BY id desc LIMIT 0, 30 ) as sub

не хватает LEFT JOIN dle_post ON ...


(SELECT " . PREFIX . "_comments.id FROM " . PREFIX . "_comments LEFT JOIN " . PREFIX . "_post ON " . PREFIX . "_comments.post_id=" . PREFIX . "_post.id " . $where . " ORDER BY " . PREFIX . "_comments.id desc LIMIT ".$fromcstart.", ".intval($config['comm_nummers'])." ) as sub


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...