$res=$DB->query("SELECT (cost) FROM t_table"); while ( $row = $res->fetchArray() ){ c("edit5")->text = $row['cost']; }