⚠ 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

SQLite ?



redl
  • profile picture
  • Member

Posted 10 January 2012 - 00:36 AM

Hi ! I just discovered your fabulous work ! It's really awesome !

I was wondering if it would be possible to port that to work with SQLite databases ? I had a quick look at the source, but I guess this is a bit over my level...

I know it is more difficult to get SQLite's databases metadata, but even with less functionality, your script would be very useful !

Thanks !

steveoc
  • profile picture
  • Member

Posted 10 January 2012 - 03:48 AM

grocery_CRUD is built on top of CodeIgniter ... which in turn provides the actual database drivers for a range of different DBs - including SQLite.

If you edit
application/config/database.php

and set the appropriate line to sqllite, it should work !
(should be line 55)

$db['default']['dbdriver'] = 'sqllite';

According to the doco, it should also work with :
['dbdriver'] The database type. ie: mysql. Currently supported: mysql, mysqli, postgre, odbc, mssql, sqlite, oci8

Having said that, there are several internal database calls that grocery_CRUD uses to determine the layout of tables and types of fields - any one of these _may_ be a source of incompatibility, but it does look OK from here. (Havent actually tried to use SQLLite yet)

Have a read of this thread for more info on what may be needed to get it working thoroughly with other databases :
/topic/50-postgresql-and-grocery-crud/page__hl__postgresql__fromsearch__1

Try that and let us know how it goes.

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

Posted 10 January 2012 - 07:44 AM

With SQLLite doesn't work completely.

You can though try to use the set_model function to use your custom model for sqllite, without changing the actual core of grocery_CRUD. There is still not anyone yet to have this model to send it to you or have a link of it.
And to create it, its really easy. Just follow the ERRORS :)

wenkhairu
  • profile picture
  • Member

Posted 10 January 2012 - 14:24 PM

I was wondering it will work great if we use some custom model in codeigniter, i have made it with SQLServer 2005 before, with some line of code in grocery_crud library it will work

rolo2012
  • profile picture
  • Member

Posted 05 July 2012 - 18:48 PM

I made this model for sqlite3
/topic/651-suport-for-sqlite3/