crudkit
crudkit copied to clipboard
Can't attach mysql pages to crudkit app
When I try to attach mysql pages I get this error
Whoops\Exception\ErrorException …/vendor/skyronic/crudkit/src/CrudKit/Data/SQLDataProvider.php142
Whoops \ Exception \ ErrorException (E_NOTICE)
HELP
Undefined offset: 0
Looks like you've forgotten to define the summary_cols
property in your
config.
On 19 April 2016 at 14:53, Essam A. Hassan [email protected] wrote:
When I try to attach mysql pages I get this error
Whoops\Exception\ErrorException …/vendor/skyronic/crudkit/src/CrudKit/Data/SQLDataProvider.php142
Whoops \ Exception \ ErrorException (E_NOTICE) HELP Undefined offset: 0 [image: screenshot from 2016-04-19 14 52 08] https://cloud.githubusercontent.com/assets/5016807/14639706/4ffb5f9c-063e-11e6-98b7-8ccc2ba76ad8.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/skyronic/crudkit/issues/55
Thanks! it works now!
I have no idea how I missed that lol
where can i find that config file?
Use setPrimaryColumn, addColumn and setSummaryColumns functions: e.g.
$page = new SQLiteTablePage("sqlite2", "fixtures/chinook.sqlite");
$page->setName("Customer Management")->setTableName("Customer")->setRowsPerPage(20)->setPrimaryColumn("CustomerId")->addColumn("FirstName", "First Name", array('required' => true))->addColumn("LastName", "Last Name")->addColumn("City", "City", array('required' => true))->addColumn("Country", "Country")->addColumn("Email", "E-mail")->setSummaryColumns(array("FirstName", "Country"));
Greetings