Show news from a certain user only
Posted: 22. May 2023 20:07
Hi, I would like to use the news module but showing only the topics from determinated id user.
In news.php, I tried adding a new sql sentence like: AND topic_poster = (user_id), but it didn't work.
Somebody can I help me? Thanks!
In news.php, I tried adding a new sql sentence like: AND topic_poster = (user_id), but it didn't work.
Code: Select all
$sql = 'SELECT COUNT(topic_id) AS num_topics
FROM ' . TOPICS_TABLE . '
WHERE ' . $topic_type . '
AND topic_visibility = ' . ITEM_APPROVED . '
AND topic_moved_id = 0
AND topic_poster = 232