Postgres::browseRow PHP Method

browseRow() public method

Returns a recordset of all columns in a table
public browseRow ( $table, $key ) : A
$table The name of a table
$key The associative array holding the key to retrieve
return A recordset
    function browseRow($table, $key)
    {
        $f_schema = $this->_schema;
        $this->fieldClean($f_schema);
        $this->fieldClean($table);
        $sql = "SELECT * FROM \"{$f_schema}\".\"{$table}\"";
        if (is_array($key) && sizeof($key) > 0) {
            $sql .= " WHERE true";
            foreach ($key as $k => $v) {
                $this->fieldClean($k);
                $this->clean($v);
                $sql .= " AND \"{$k}\"='{$v}'";
            }
        }
        return $this->selectSet($sql);
    }
Postgres