protected function &loadData($variant)
{
$variant = mysql_real_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";
$rs = mysql_query($statement, $this->db);
$result = array();
while ($row = mysql_fetch_array($rs, MYSQL_NUM)) {
$source = $row[1];
$result[$source][] = $row[2];
//target
$result[$source][] = $row[0];
//id
$result[$source][] = $row[3];
//comments
}
return $result;
}