select m.*, g.group_id, g.group_name, u.user_name
from media m, media_categorise c, media_group g, user u
where
m.create_user = u.user_id and m.categorise_id = c.categorise_id and c.group_id = g.group_id and c.group_id = 3
and (m.is_publish = 1 or m.create_user = 0) and m.is_drop = 0
order by
m.create_time desc limit 780, 30