I’m trying to create a small test app, following the logic from the First App sample application.
I have a grid that loads and display data from a single database table using the PHP Connector.
I’ve set up logging which on load returns:
SELECT `ID`,`login`,`fname`,`lname`,`email`,`salt`,`pass`,`planmngr`,`active`,`locked`,`lastlogindt`,`createdt` FROM account
Done in 0.00078797340393066s
The grid is set up with:
var accountGrid = layout.cells("a").attachGrid();
accountGrid.setHeader("login,First Name,Last Name,E-Mail,salt,pass,Plan Manager,Active,Locked,Last Login,Created");
accountGrid.setColumnIds("login,fname,lname,email,salt,pass,planmngr,active,locked,lastlogindt,createdt");
accountGrid.setColTypes("ro,ro,ro,ro,ro,ro,ch,ch,ch,dhxCalendar,dhxCalendar");
accountGrid.setColSorting("str,str,str,str,str,str,int,int,int,date,date");
accountGrid.setDateFormat("%Y-%m-%d");
accountGrid.setImagePath("codebase/imgs/");
accountGrid.init();
but when writing to database I get:
[code]DataProcessor object initialized
137_gr_id => 137
137_!nativeeditor_status => updated
ids => 137
Row data [137]
ID => 137
!nativeeditor_status => updated
Incorrect field name used: login
[/code]
And so on, with an Incorrect field name used message for each field, and then ending with:
[code]PDATE account SET login
=‘’,fname
=‘’,lname
=‘’,email
=‘’,salt
=‘’,pass
=‘’,planmngr
=‘’,active
=‘’,locked
=‘’,lastlogindt
=‘’,createdt
=‘’ WHERE ID
=‘137’
exception ‘Exception’ with message ‘MySQL operation failed
Incorrect integer value: ‘’ for column ‘planmngr’ at row 1’ in /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/db_common.php:965
Stack trace:
#0 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/db_common.php(637): MySQLDBDataWrapper->query(‘UPDATE account …’)
#1 [internal function]: DBDataWrapper->update(Object(DataAction), Object(DataRequestConfig))
#2 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/dataprocessor.php(222): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/dataprocessor.php(173): DataProcessor->check_exts(Object(DataAction), ‘update’)
#4 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/dataprocessor.php(102): DataProcessor->inner_process(Object(DataAction))
#5 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/base_connector.php(475): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 /usr/share/nginx/html/dhtmlx/4.0.3/codebase/connector/php/base_connector.php(398): Connector->render()
#7 /usr/share/nginx/html/mastersheet/data/account.php(8): Connector->render_table(‘account’, ‘ID’, ‘login,fname,lna…’)
#8 {main}
[/code]
What am I missing here?