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:
$dbtype = “PDO”;
$res = new PDO(“mysql:host=localhost;dbname=gantt”, “root”, “************”);
$gantt = new JSONGanttConnector($res,$dbtype);
and here is the table layout:
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 (
You need to use the dataprocessor component:
Thanks for the reply.
I use the below in my client frontend. Is this correct use of dataprocessor?
var dp=new gantt.dataProcessor("data.php");
Your server-side code looks well.
Could you please, share a demo link, where the problem can be reconstructed.
Please find below a demo copy.
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.
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.