⚠ 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

grocery CRUD and mySQL views



sbosx
  • profile picture
  • Member

Posted 22 May 2012 - 11:09 AM

I am trying to use grocery CRUD with not a regular table but with a view and it seems that it is not working.
Is this possible?
Does grocery CRUD support mySQL views?

Thanks in advance

sbosx
  • profile picture
  • Member

Posted 23 May 2012 - 15:59 PM

From what I can see this is a problem because of the lack of a primary key on MySQL views

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

Posted 23 May 2012 - 21:38 PM

Yes this is probably the problem. I just created a new issue ( https://github.com/scoumbourdis/grocery-crud/issues/43 ) to have the have the grocery CRUD to be compatible with views . Thank you to mention it.

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

Posted 17 June 2012 - 08:23 AM

[member='sbosx'] This issue is closed so you can easily now use mysql Views at your project by setting the primary key for example you can do something like this:

$crud->set_primary_key('id');

for more you can see http://www.grocerycrud.com/documentation/options_functions/set_primary_key