Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 12:26 am EDT

Geeklog Forums

The first comment


ismael

Anonymous
Hi,

how can i identify the first comment in a story? I want to feature it.

Thank you,
ismael
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I don't think you can get that information without modifications to the core code.

The first comment to a story is the comment with a parent id (pid) of 0 that has the lowest comment id (cid). I.e. all the top-level comments to a story have a pid = 0. Since the cid is an auto_increment field, the lowest cid should be the first comment.

bye, Dirk
 Quote

All times are EDT. The time is now 12:26 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content