function set_values($prefix) { global $TPL; $db = new db_alloc(); $db->query("SELECT * FROM invoiceRepeatDate WHERE invoiceRepeatID = %d", $this->get_id()); while ($row = $db->row()) { $rows[] = $row["invoiceDate"]; } $TPL[$prefix . "frequency"] = implode(" ", (array) $rows); return parent::set_values($prefix); }