query($sql)){ while ($rec=$DB->record($rs)){?>