2014-04-24 19 views
2

我有問題,我的項目裝入數據庫,在數據庫中的數據不能在甘特圖DHTMLX顯示不能dhtmlxgantt PHP

這是我在data.php

<?php 

    include ('../../codebase/connector/gantt_connector.php'); 

    $res=mysql_connect("localhost","root",""); 
    mysql_select_db("gantt"); 

    $gantt = new JSONGanttConnector($res); 
    //$gantt->render_links("gantt_links","id","source",target,type"); 
    $gantt->render_table(
    "schedule", 
    "id",matrl,"cust_name","po_num", 
    "start_date,duration" 
); 
?> 

回答

2

代碼您正在使用怪render_table 它必須是render_table(表,ID,字段)

$gantt->render_table(
/*table*/ "schedule", 
/*id*/  "id", 
/*fields*/ "start_date,duration,matrl,cust_name,po_num" 
);