ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How are comments stored?

December 12, 2008 7:48am

Subscribe [2]
  • #1 / Dec 12, 2008 7:48am

    Beertastic

    49 posts

    I’ve been playing about with blog comments in various sections, both being opened by standard views and reverse relational ones..

    I’ve just noticed that when I comment on a blog that’s viewd from a relational fetch, the comments total doesn’t change.

    I went to the DB itself and found several ‘comment total’ entries in the exp_relationships table..

    I deleted all comments via the CMs and yet the comment total remained as it was in the exp_relationship table.

    I’ve now gone and manually removed all comment references from teh serializes field and have replicated the problem many times..

    does anyone know how comments are processed, so I can track down what’s what?

    Sigh.. I’ll stop asking questions one day! promise…

  • #2 / Dec 12, 2008 11:24am

    Ingmar

    29245 posts

    Comments are stored in exp_comments, so you could always simply count them in there with an SQL query. As to the internal workings of the comment module, you’d really have to take a peek at the source itself, I am afraid…

  • #3 / Dec 12, 2008 11:27am

    Beertastic

    49 posts

    Yeah, I found them..
    but there were references to total comments in the exp_relationship table too.
    Really frustrating, cause it doesn’t just count the comments on the fly, it uses the relationship tale to gether the comment_total variable…

    and on my site, it’s incorrect… you can adda comment and it doesn’t update the exp_relationship table correctly…
    but that’s propably to do with my other thread, abdout my my revers relationship blog calls are failing…

    Oh I can’t wait to get the paid licence… ;-p

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases