Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Can't attach mysql pages to crudkit app #55

Open
essamhassan opened this issue Apr 19, 2016 · 5 comments
Open

Can't attach mysql pages to crudkit app #55

essamhassan opened this issue Apr 19, 2016 · 5 comments

Comments

@essamhassan
Copy link

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

@oadam
Copy link

oadam commented Apr 19, 2016

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
#55

@essamhassan
Copy link
Author

Thanks! it works now!

@essamhassan
Copy link
Author

I have no idea how I missed that lol

@jaeturma
Copy link

where can i find that config file?

@sonnykwe
Copy link

sonnykwe commented May 1, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants