How to update database with Webix Jet and PHP connector?

Hi,

Following is webix jet data model

export const devices = new webix.DataCollection({
url:"/php/sp_connector.php",
save:"/php/sp_connector.php"
});

Following is code in sp_connector.php

<?php 
require_once("../config.php"); 
require("../../codebase/db_mysqli.php");
$conn = new mysqli($mysql_server, $mysql_user, $mysql_pass, $mysql_db); 

require("../../codebase/data_connector.php"); $dbtype = "MySQLi"; $data = new JSONDataConnector($conn, $dbtype); 
$data->dynamic_loading(100); 
$data->render_table("device","deviceId","deviceId,deviceName,deviceStatus");
 ?>

I can read data from Webix Jet, but devices.updateItem(values.id,values) and devices.add(values) is not working, why ?

Please advise,

Thanks,
Willy Lin

Hi,

Data saving requires usage of Webix connector proxy.
Please, refer to the following docs chapter:

https://docs.webix.com/desktop__dataconnector.html#savingdatawithconnectors

And to the related demos (which are also available in Webix package):

https://docs.webix.com/samples/40_serverside/02_php_connector/index.html