sTableName = $sNewTableName; $this->sDisplayColumn = $sNewDisplayColumn; $this->sValueColumn = $sNewValueColumn; $this->sSelectName = $sNewSelectName; $this->sWhereClause = $sNewWhereClause; $this->bOrderAsc = $bNewOrderAsc; } /** * Create the HTML string that will be used to render the list box * * @return String html used to render the list box * */ function & render() { $sql = new Owl_DB(); $sQuery = "SELECT DISTINCT $this->sDisplayColumn AS display, $this->sValueColumn AS value FROM $this->sTableName "; if (isset($this->sWhereClause)) { $sQuery .= "WHERE " . $this->sWhereClause . " "; } $sQuery .= "ORDER BY $this->sDisplayColumn " . ($this->bOrderAsc ? "ASC" : "DESC"); $sql->query($sQuery); $sToRender = "

"; return $sToRender; } } ?>