Jump to content

SQL updating `created_at` erroneously (or so I think)


Recommended Posts

Update: Solved

--

Picked up a bug with Jumplinks regarding the update of mapping collections.

When the method commitMappingCollection has determined that the collection is being updated, the following SQL template is used:

UPDATE {$this->tableName}_mc SET collection_name = '%s', collection_mappings = '%s', user_updated = %s, updated_at = CURRENT_TIMESTAMP WHERE id = %s

As you can see, I'm not updating the column created_at, only updated_at. But, for some reason, created_at is also being updated to CURRENT_TIMESTAMP.

(At one point I thought I was simply displaying the incorrect data in the info box, but, after having checked the DB and my code, it seems I'm doing everything correctly...)

Interestingly enough, this only happens with mapping collections, not with jumplinks.

What am I missing?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...