Update data to DataBase

Hello :slight_smile:

In the project that I’m working at, I have a Table that show alot of “Molds”, and when I click on a specific one(URL with ID), I show the Gantt Chart for that “ID”, like this:

<?php $id = $_GET['id']; $res=mysql_connect("localhost","root","blaaaaaa"); mysql_select_db("blaaaaaa"); $gantt = new JSONGanttConnector($res); $query = "SELECT * FROM gantt_tasks WHERE num_mould =".$id; $gantt->render_table($query,"id","start_date,duration,text,progress,sortorder,parent,num_mold"); ?>

And as you can see, in the “render_table” function, I have this collumn name “num_mold”.

So the problem is: when in the Gantt Chart I click in the “+” button, to add “New Task”, it really creates that Task, but I wanted to update that “num_mold” colloumn with the ID , and I dont know how to do it ://

Please, it is urgent :confused: Can somebody help me? :X

Thanks

Hello,
api of dhtmlxConnector allows modifying fields before saving to the database, you may try something as described here

docs.dhtmlx.com/doku.php?id=dhtm … ore_saving

Hello :slight_smile:

gantt.attachEvent(“onBeforeTaskAdd”, function(id,item){
//example
item.column_table = “something”;
});

With this code, it’s possible to add something :slight_smile:

Thanks anyway :slight_smile: