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.

exp:query fails to update exp_comments entry_date value

August 10, 2009 7:55am

Subscribe [2]
  • #1 / Aug 10, 2009 7:55am

    KomodoDave

    39 posts

    I’d like to set the edit_date of a specific comment (comment_id is known) in exp_comments. I try this, for example:

    {exp:query sql="UPDATE exp_comments SET edit_date=NOW() WHERE comment_id='6'"}{/exp:query}

    ..and the entry_date for comment_id 6 does not get set to NOW() (I’m looking in phpMyAdmin, and refreshing the view of course). The above code is on its own in a template, and I’m simplying viewing the rendered template to run the query.

    Any ideas what I’m doing wrong?

  • #2 / Aug 10, 2009 8:15am

    Ingmar

    29245 posts

    For security reasons, the query module only supports SELECT statements, UPDATE or DELETE queries will be ignored.

  • #3 / Aug 10, 2009 8:31am

    KomodoDave

    39 posts

    For security reasons, the query module only supports SELECT statements, UPDATE or DELETE queries will be ignored.

    Ah, ok, I’ll write a quick plugin for it then. Thanks Ingmar.

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

ExpressionEngine News!

#eecms, #events, #releases