After staring at the samples and docs, I’m struggling to get a handle on everything I need to set up this app how I want it.
Can someone please just tell me which of the following things I need to use together to just “make it work”? That would be so helpful.
My setup is very simple: I want to run the Mobile Sheduler with a MySQL (pdo) / PHP backend, transferring data formatted as JSON, using dhtmlxConnector to handle all the CRUD operations. I know eventually that I will need to create custom SQL statements (it’s going to interface on a pre-made database and info I’m accessing is spread across multiple tables), but that’s ok.
I think I need to use some magic combination of:
dataprocessor.js
connector.js
JSONDataConnector
connector.php
I just need a nice simple sample that covers this setup. I’ve got the app designed, the backend is ready, so it’s this middleware that I need to figure out.
Please take a look at the following sample:
dhtmlxScheduler_mobile_v35_120626/samples/01_basic/05_data_saving.html
Here data are loaded in xml format, xml is generated automatically. If json is format is required, you can use JSONDataConnector instead of schedulerConnector. Here is the example of server-side:
//include ('../../../../connector-php/codebase/scheduler_connector.php');
include ('../../../../connector-php/codebase/data_connector.php');
...
//$scheduler = new schedulerConnector($res);
$scheduler = new JSONDataConnector($res);
$scheduler->render_table("events","event_id","start_date,end_date,event_name(text),details");
Note: in the last line I defined an alias for field “event_name” (scheduler templates and form use “text” property as event name)
In the scheduler definition code you will need to change “data driver” type from “scheduler” to “json”.