JSON not rendering

Hi all,
I’ve followed all the tutorials I can find online for this but I can not get my data.php file to render the JSON for the Gantt chart to read. I am unable to find the error after searching for a few weeks. I am still learning PHP and I am not sure if I am just overlooking something small.
Any help at all would be very much appreciated.

data.php

<?php include ('codebase/connector/gantt_connector.php'); $res=mysql_connect("localhost:3306","root","admin"); mysql_select_db("gantt"); $gantt = new JSONGanttConnector($res); $gantt->render_links("gantt_links","id","source","target","type"); $gantt->render_table( "gantt_tasks", "id", "start_date","duration","text","progress","sortorder","parent" ); ?>

index.php (Snippet)

Hello,
try opening data.php in your browser so you’ll see the output of the file. If it’s valid json or xml then the issue would be on a client side (most common is a date format mismatch, or not expected data type e.g. xml instead of json). If it’s not, the output most probably will contain an error message that should give you a hint.

Regarding your code, please check the arguments of $connector->render_links and $connector->render_table methods:
data.php:

$gantt->render_links("gantt_links","id","source","target","type"); $gantt->render_table( "gantt_tasks", "id", "start_date","duration","text","progress","sortorder","parent" );
docs.dhtmlx.com/gantt/desktop__h … hedatabase

$gantt->render_links("gantt_links","id","source,target,type"); $gantt->render_table( "gantt_tasks", "id", "start_date,duration,text,progress,sortorder,parent" );
the third argument in both is a comma separated list of columns, while in your case it’s a property per argument