⚠ 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

Fatal error: Cannot access empty property in /.../application/libraries/Grocery_CRUD.php on line 1540



Vole Hare
  • profile picture
  • Member

Posted 06 September 2013 - 07:28 AM

Hello,

 

When i use $crud -> set_table(table_name);

 

* table_name is a "view"

I got a error message "Fatal error: Cannot access empty property in /.../application/libraries/Grocery_CRUD.php on line 1540"

I think maybe the point is there is no primary key or index on view?

How can i resolve it?

 


davidoster
  • profile picture
  • Member

Posted 06 September 2013 - 09:03 AM

Hello and welcome to the forums [member=vole hare].

Actually Grocery CRUD can't use a view as a table unless you set the primary key!

Check here.

 

Internally GC library uses the PK to do most of its indexing, that's why.