Correct format for "open" column in mySql

Hi,

I would like to use the “open” setting on some of my columns and I’m looking for the right format to write it down in my database.

I’m using a MySql database and store in a TINYINT column 1 if I want to see the subtasks details, 0 if not.

But so far it doesn’t work.

My PHP:

<?php

require_once('config.php');

$gantt = new JSONGanttConnector($res, $dbtype);

///// Commented   $gantt->mix("open", 0);
$gantt->enable_order("sortorder");
$gantt->enable_log($db_name.".log");

$gantt->render_table(
    "gantt_tasks",
    "id",
    "start_date,end_date,planned_start, planned_end,text,planned_processing_time, parent, open,task_type,status",""
);

I tried replacing the format by TEXT and “true” or “false” values but it didn’t help.

So far I found a turnaround by inserting the following JS inspired from your website:

gantt.eachTask(function(task) { if (task.open == 1) { task.$open = true; } else { task.$open = false; } }) gantt.render();

But I thinks there must be a better way.

Many thanks,

Sébastien