Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.