
07-30-2004, 01:58 PM
|
|
|
Join Date: Feb 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
It might be a great hack, but it don?t work to me 
I get:
Quote:
SELECT IF(votenum >= 2, votenum, 0) AS votenum, IF(votenum >= 2 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
thread.threadid, thread.title, replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=replycount, replycount+1, views) AS views, forumid, post.postid, pagetext, allowsmilie
, showsignature, usertextfield.signature
,thread.iconid AS threadiconid, iconpath AS threadiconpath
, avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision
, NOT ISNULL(subscribethread.subscribethreadid) AS subscribed
, attachment.filename, attachment.filesize, attachment.visible, attachmentid, counter, thumbnail, LENGTH(thumbnail) AS thumbnailsize
FROM thread AS thread
LEFT JOIN post AS post ON (post.postid = thread.firstpostid)
LEFT JOIN icon USING (iconid)
LEFT JOIN attachment AS attachment ON (post.postid = attachment.postid)
LEFT JOIN user AS user ON (user.userid = post.userid)
LEFT JOIN usertextfield AS usertextfield ON (post.userid = usertextfield.userid)
LEFT JOIN avatar as avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN customavatar as customavatar ON (customavatar.userid = user.userid)
LEFT JOIN subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = '59')
LEFT JOIN deletionlog AS deletionlog ON (thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE forumid IN(93) AND thread.visible = 1 AND thread.open != 10 AND deletionlog.primaryid IS NULL
GROUP BY post.postid
ORDER BY postdateline DESC
LIMIT 4
mysql error: Column: 'iconpath' in field list is ambiguous
mysql error number: 1052
|
Can anyone help me please?
Edit: I?m using VB 3.0.3
Garfiled
|