Jump to content

get topics written by a user


hassank1

Recommended Posts

I need the best query that will get me all the TopicIDs written by a specific user (UserID)

 

[i know it would be a better idea to save the creatorID with the 1st table,however I didn't think of that back then].

 

here are the 2 tables :

 

1- table name : boardtopics

fields : TopicID - title

 

2-table name : boardposts

fields : BoardPostID -  TopicID - UserID - post  - PostDate

 

note: of course the 2nd table may have many posts belonging to the same TopicID but the 1st poster is the one who has the lower PostDate (he posted 1st)

 

thx

Link to comment
https://forums.phpfreaks.com/topic/157503-get-topics-written-by-a-user/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.