php: database tables can be read directly into variables used in a web application.
$sql = "Select coefficient, train_freq, smarts,
count_matches('CNC(=O)Cc1cc(C)cc(N)c1',smarts) as count, array_to_string(list_matches('CNC(=O)Cc1cc(C)cc(N)c1',smarts,0),',')
as alist from xlogp.atom_types where gnova.matches('CNC(=O)Cc1cc(C)cc(N)c1',smarts)
order by coefficient";
$result = pg_exec($sql);
$nrows = pg_numrows($result);
for ($j=1; $j <= $numrows; ++$j) {
$row = pg_fetch_array($result);
$count = $row["count"];
$alist = $row["alist"];
}