Retrieve / Store in multiple tables

Hello,

I am trying to build a Gantt with data coming from 2 SQL tables :

  • my projects are stored in gantt_projects
  • my tasks are stored in gantt_tasks , in the tasks table, the parent filed corresponds to the project ID.

Using SQL, I have been able to display correctly the 2 sets of datas on the Gantt, but when I apply a modification, it is not stored in the database.
Do you have any idea why?

When I remove the UNION SELECT part, modifications are correctly stored.

Here is what my connector looks like :

[code]<?php
include (‘config.php’);
$gantt = new JSONGanttConnector($res, $dbtype);
$gantt->mix(“open”, 1);

$sql_req = “SELECT * FROM gantt_projects UNION SELECT * FROM gantt_tasks”;
$gantt->render_sql(
$sql_req,
“id”,“start_date,duration,text,progress,parent”,"");

?>
[/code]

Hi,
please check this article
docs.dhtmlx.com/connector__php__ … ral_tables