⚠ 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

pure json crud possible?



rat
  • profile picture
  • Member

Posted 28 May 2012 - 13:07 PM

is it possible to use crud with just json and no database?
what i mean is to have jquery functions that gets table data, adds table data, deletes table data...

In my project I need to get/edit/delete data from remote server, whitch I fetch trough API and not with direct DB access.

Is there maybe some kind of easy code modification to do this?

or does somebody have quick-and-easy-to-use alternatives for this?

kenvogt
  • profile picture
  • Member

Posted 28 May 2012 - 16:31 PM

This is really more of a Codeigniter question. Grocery Crud is just built on top of it. You might want to see about how to connect to a database in Codeigniter here.

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

Posted 28 May 2012 - 19:11 PM

Well a quick and easy fix... no! It has many calls to database, but you can change the model of grocery CRUD ( application/models/grocery_crud_model.php ) and change only this file. If you don't want to change grocery CRUD core. You can of course use the set_model for this ( http://www.grocerycr...tions/set_model and http://www.grocerycr...ample-included/ for examples of how to use it).
I think it deserves a try as it is only one file to change. Every database call is all there so you don't have to change anything else.

rat
  • profile picture
  • Member

Posted 29 May 2012 - 10:36 AM

Thank you for your answers.
As I'm on a tight schedule I decided to do it manually with datatables & jquery. It's easyer for me since I've already worked with datatables and grocery_crud_model file is quite big to change every single function... :blink: