protected function &loadData($variant)
{
$variant = sqlite_escape_string($variant);
$statement = "SELECT t.id, t.source, t.target, t.comments\n\t\t\t\tFROM trans_unit t, catalogue c\n \t\t\t\tWHERE c.cat_id = t.cat_id\n\t\t\t\t\tAND c.name = '{$variant}' \n\t\t\t\tORDER BY id ASC";
$db = sqlite_open($this->source);
$rs = sqlite_query($statement, $db);
$result = array();
while ($row = sqlite_fetch_array($rs, SQLITE_NUM)) {
$source = $row[1];
$result[$source][] = $row[2];
//target
$result[$source][] = $row[0];
//id
$result[$source][] = $row[3];
//comments
}
sqlite_close($db);
return $result;
}