How to limit the number of records read "links"?

Hello

I’m using “render_sql” to reduce number of records for gantt tasks.
I’d like to read “links” record using the same method.

For example: I’d like to read “links” for my tasks (not everything).
“render_links” get everything from table gantt_links.

I tried to use method with “set_options”.
Method works only for reading but it does not save changes to the database.

Is there a method to do that?

Can someone help me?
Thank You
Przemek

Hi,
currently the only way to achieve this is initializing gantt links connector explicitly and adding ‘WHERE’ clause to the select query:
e.g.

[code]$gantt = new JSONGanttConnector($res, $dbtype);

$links = new JSONGanttLinksConnector($res, $dbtype);
$links->render_sql("SELECT id, source, target, type, project_id FROM gantt_links WHERE project_id = ". $res->quote($projectId), “id”, “source,target,type,project_id”);

$gantt->set_options(“links”, $links);

$gantt->render_table(“gantt_tasks”,“id”,“start_date,duration,text,progress,type, parent,level,project_id”);[/code] It should work for both reading and saving links to the db