PDA

Click to See Complete Forum and Search --> : JOIN string HELP!!


nkad
Oct 18th, 2000, 04:03 PM
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?

HunterMcCray
Oct 19th, 2000, 04:03 PM
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,

Hunter