⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

current_timestamp not saving on update



Daryl
  • profile picture
  • Member

Posted 11 April 2012 - 04:30 AM

Hello all, great project you have here!
I have used the current version of GCrud to build a database admin and am just about finished, except for the following problem...
I have a 'last_modified' field that uses a CURRENT_TIMESTAMP (with all the recommended options).It fails to update the timestamp when using GCrud but works perfectly through phpmyadmin. Does anyone have any idea what could be the problem?

Cheers.

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 11 April 2012 - 06:27 AM

I don't know about the CURRENT_TIMESTAMP problem but you can use the example of this post: http://www.grocerycr...ample-included/

And don't worry, it will work fine with your new system of CI 2.1

Daryl
  • profile picture
  • Member

Posted 11 April 2012 - 06:47 AM

Thanks web-johnny. Do you mean that I have to use that extension for it to update properly? Shouldn't a current_timestamp field just be automatically updated whenever the Crud object is updated?
Cheers.