|
-
Oct 18th, 2000, 04:03 PM
#1
Thread Starter
Fanatic Member
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?
-
Oct 19th, 2000, 04:03 PM
#2
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|