$result = dbquery(
"SELECT tcm.*,user_name,user_avatar,enable_kod,enable_post,enable_avatar,post1,code1 FROM ".DB_PREFIX."comments tcm
LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
LEFT JOIN ".DB_PREFIX."comments_settings ON
enable_kod=enable_kod
AND enable_post=enable_post
AND enable_avatar=enable_avatar
AND post1=post1
AND code1=code1
WHERE comment_item_id='$cid' AND comment_type='$ctype'
ORDER BY comment_datestamp ASC"
);