crudkit icon indicating copy to clipboard operation
crudkit copied to clipboard

Can't attach mysql pages to crudkit app

Open essamhassan opened this issue 8 years ago • 5 comments

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 screenshot from 2016-04-19 14 52 08

essamhassan avatar Apr 19 '16 12:04 essamhassan

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

oadam avatar Apr 19 '16 12:04 oadam

Thanks! it works now!

essamhassan avatar Apr 19 '16 12:04 essamhassan

I have no idea how I missed that lol

essamhassan avatar Apr 19 '16 12:04 essamhassan

where can i find that config file?

jaeturma avatar Apr 27 '16 02:04 jaeturma

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

sonnykwe avatar May 01 '18 21:05 sonnykwe