Hi,
i'm writing a module, which shows the 5 latest content entries. my db request looks like:
PHP Code:
$query = "SELECT c.*,
cc.name AS category,
cc.id,
s.name AS section,
s.id,
g.name AS groups,
g.id,
u.name as author,
u.usertype,
ROUND(v.rating_sum/v.rating_count) AS rating,
v.rating_count
FROM #__content AS c,
#__users AS u,
#__categories AS cc,
#__sections AS s,
#__groups AS g,
#__content_rating AS v
WHERE c.catid = cc.id
AND
cc.section = s.id
AND
c.access = g.id
AND
u.id = c.created_by
AND
c.state = '1'
AND
c.checked_out = '0'
AND
c.sectionid > '0'
AND
( c.publish_up = '0000-00-00 00:00:00'
OR
c.publish_up <= '". $now ."' )
AND
( c.publish_down = '0000-00-00 00:00:00'
OR
c.publish_down >= '". $now ."' )
ORDER BY c.created ASC ";
i have two problems:
1. when i use the request this way, i get only the latest entries which were already rated-> but i want to show also the unrated
2. i give the result of the request to the function
PHP Code:
BlogOutput( $rows, $params, $gid, $access, $pop, $menu );
. the output seems ok, but when i click on read more, i get the
Code:
You are not authorized to view this resource.
You need to login.
error.
can anyone help?
thanks,
tom