Results 1 to 2 of 2

Thread: JOIN string HELP!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2000
    Here it its...

    SELECT * ,(SELECT COUNT(*) FROM replys WHERE replys.thread_id = threads.thread_id) AS reply_count FROM threads, members WHERE threads.forum_id = " & Forum_ID & " AND members.member_id = threads.member_id"

    As i guess you can tell, this is for a message board system.
    My problem is i want to pull out the member name from my members table that relates to my threads table. But it keeps pulling the same person out!

    Any ideas?

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Holden Beach NC

    Best way that I have found to debug SQL is by creating it in ACCESS. Even if you are not using ACCESS, sometimes it helps to create an access database with the required tables and fields; build the sql in the design query and then copy the SQLView when everything works. Sometimes on complex joins it saves me a great deal of time.

    Hope it helps,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width