⚠ 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

Transactions supported in GC?



richb201

richb201
  • profile picture
  • Member

Posted 18 October 2017 - 14:56 PM

I need to know if GC supports codeigniter transactions? I sure hope that someone up here knows the answer before I waste anymore time on GC. The row in the table in question wil only be updated by one GC user,so I am not worried about two users writing at the same time. Other users may be updating other records with GC. But I have a second codeigniter app that will be reading that record and I am worried about the GC app writing the same record that another process is reading, at the same time.

Is this taken care of automatically in GC or will I need to write my own function to update a record that uses transactions (or table locking?).

If so, can you give me an idea of what I need to do?

darkstalker

darkstalker
  • profile picture
  • Member

Posted 18 October 2017 - 20:12 PM

Well, i use transactions in GC.
The paradigm is MVC, so you just need to put transactions in the function inside the model that update the records. You just use the methods your language provide ( code igniter if you are using it)

I’m editing the original message to clarify why i use transactions. I use them only because i need to do more operations one after another, and want to be sure all the operations are executed or none of them.
Maybe in your case transactions are not needed but maybe someone can be more precise than me