DHTMLXGantt - MYSQL - Can't make changes

Hi All,

I have an issue where I can read data from a MYSQL DB but writing data back isn’t working. Is anyone able to shed some light on why?

Here is my code in the data.php file:

include (‘codebase/connector/gantt_connector.php’);
$dbtype = “PDO”;
$res = new PDO(“mysql:host=localhost;dbname=gantt”, “root”, “************”);
$gantt = new JSONGanttConnector($res,$dbtype);
$gantt->render_links(“gantt_links”,“id”,“source,target,type”,“”);
$gantt->render_table(“gantt_tasks”);

and here is the table layout:

CREATE TABLE gantt_tasks (
id int(11) NOT NULL AUTO_INCREMENT,
start_date datetime NOT NULL,
duration int(11) NOT NULL DEFAULT 0,
progress float NOT NULL DEFAULT 0,
parent int(11) NOT NULL,
user int(11) NOT NULL,
open BOOLEAN DEFAULT NULL,
text varchar(255) NOT NULL,
PRIMARY KEY (id)
);

You need to use the dataprocessor component:
docs.dhtmlx.com/dataprocessor__index.html

Thanks for the reply.
I use the below in my client frontend. Is this correct use of dataprocessor?

gantt.load('data.php');
var dp=new gantt.dataProcessor("data.php");  
dp.init(gantt);

Your server-side code looks well.
Could you please, share a demo link, where the problem can be reconstructed.

Hi Sematik,

Please find below a demo copy.
partbandc.com:6781/index.php

Note: DHTMLXGantt appears to have misread the dates so you’ll have to ‘Zoom’ to see the data.

Your provided link requires the authentication.
Could you please, open ticket at support.dhtmlx.com and provide a required info to reconstruct the problem

Would love to but am using the free tier product - at least at the moment.
Thanks anyway!

BTW, I got the earlier link working with Anonymous Auth if still useful.

Your data2.php request returns the empty json and the 500 error.
While your data.php returns a valid json.