The default MySQL database connection is working properly.
But I should love to use MS SQL 2008 R2 server.
In first I have problem with the MS SQL datetime type what is basically kills the PHP.
A fair code is ---- date(“Y-m-d”,strtotime(start_date) — what is able to print the date in PHP.
Every other data is pulled.
I have tried to correct the connection.php according to this:
$gantt->render_table(“gantt_tasks”,“id”,“date(‘Y-m-d’,strtotime(start_date)),duration,text,progress,order,parent”);
but the JSONGanttConnector is not able to draw the gantt.
Is it important or some other problems are behind the failure?
My connector.php:
<?php include ('codebase/connector/db_sqlsrv.php'); include ('codebase/connector/gantt_connector.php'); // MS SQL $dbtype = "SQLSrv"; $serverName = "(local)\EWORDOC2"; $connectionInfo = array( "Database"=>"TESZT" ); $conn = sqlsrv_connect( $serverName, $connectionInfo); $gantt = new JSONGanttConnector($conn,$dbtype); $gantt->render_links("gantt_links","id","source,target,type"); //$gantt->render_table("gantt_tasks","id","start_date,duration,text,progress,order,parent"); $gantt->render_table("gantt_tasks","id","date('Y-m-d',strtotime(start_date)),duration,text,progress,order,parent"); ?>Please, help!
Regards, Peter