1st problem:

SELECT F.id,
              F.title,
             F.description,
            F.created,
            (select count(*) from forum F, topic T where F.id=T.forum_id AND
T.reply_id=0 ) count1,
            (select count(*) from forum F, topic T where F.id=T.forum_id  )
count2
            from forum F, topic T where F.id=T.forum_id AND T.reply_id=0
GROUP BY F.id




2nd problem:

SELECT T.title,
                T.id,
                P.nick,
                (select count(*) from topic where reply_id = T.reply_id)
replies
 FROM topic T, profile P WHERE T.author_id=P.id AND T.forum_id=1 and
reply_id=0;



what is wrong with these queries?


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to