Re: working on my new blog and...
Posted by:
Lego Boy
Date: January 28, 2005 01:49PM
Ok, this is probably obvious to you, but I can't get this to work. Can anyone help?
SELECT posts.*, author.user_name AS author_name,
p1.permission AS author_permission, p2.permission AS user_permission
FROM posts
LEFT JOIN users AS author ON (author.id = post.user_id)
LEFT JOIN users AS user ON (user.id = 1)
LEFT JOIN user_permissions AS p1 ON (p1.user_id = author.id AND p1.blog_id = 7)
LEFT JOIN user_permissions AS p2 ON (p2.user_id = 1 AND p2.blog_id = 7)
LEFT JOIN blogs AS blog ON (id = 7)
WHERE posts.blog_id = 7
AND ((FIND_IN_SET('admin', user_permission) > 0)
OR (((blog.hidden = 0) OR (blog.hidden IS NULL))
AND ((posts.hidden = 0) OR (posts.hidden IS NULL))))
ORDER BY posts.posttime DESC
Subject
Written By
Posted
Re: working on my new blog and...
January 28, 2005 01:49PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.