JuPo
06-10-2009, 05:19 PM
Hello,
I have a error sql when trying to publish a discussion or response in my forum:
(SELECT permissions, permissions2, FIND_IN_SET(forumid, '40,29,28,-1') AS pos, forumid
FROM moderator
WHERE userid = 23 AND forumid IN (40,29,28,-1)
ORDER BY pos ASC
LIMIT 1)
UNION
(SELECT permissions, permissions2, 0, forumid
FROM moderator
WHERE userid = 23 AND forumid = -1
);
or this to edit a post:
SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize, attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow FROM attachment LEFT JOIN attachmenttype AS attachmenttype USING (extension) WHERE postid = 34 ORDER BY attachmentid;
any can help me pls ?
thank you very much...
I have a error sql when trying to publish a discussion or response in my forum:
(SELECT permissions, permissions2, FIND_IN_SET(forumid, '40,29,28,-1') AS pos, forumid
FROM moderator
WHERE userid = 23 AND forumid IN (40,29,28,-1)
ORDER BY pos ASC
LIMIT 1)
UNION
(SELECT permissions, permissions2, 0, forumid
FROM moderator
WHERE userid = 23 AND forumid = -1
);
or this to edit a post:
SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize, attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow FROM attachment LEFT JOIN attachmenttype AS attachmenttype USING (extension) WHERE postid = 34 ORDER BY attachmentid;
any can help me pls ?
thank you very much...