query to get all posts by certain user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lottidah
    Senior Member
    • Dec 2004
    • 214

    query to get all posts by certain user

    One of my forum members passed away. His family would like to get all of his (very witty and touching) posts put together to read over the holidays. I know you can pull them through the forum via Search or Statistics, but you would then have to click into each one and copy and paste elsewhere. Instead, I would like to write a SQL query that pulls all posts by this user and orders them by date.

    Can anyone advise which tables I need to look at? I'm familiar with SQL, just not the data scheme for VB.

    Thanks
  • lottidah
    Senior Member
    • Dec 2004
    • 214

    #2
    Can I please get some assistance?

    Comment

    • Lats
      Senior Member
      • Mar 2002
      • 3671

      #3
      This will get you started...
      Code:
      SELECT
       FROM_UNIXTIME((post.dateline),'%D %M %Y') AS dated, post.title, post.pagetext
      FROM
       post
      WHERE
       post.username = 'admin'
      ORDER BY
       post.dateline
      Change 'admin' to the username you need.
      Lats...

      Comment

      • lottidah
        Senior Member
        • Dec 2004
        • 214

        #4
        You are my hero. Thank you so much.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...