Granada\ORM::_add_simple_condition PHP Method

_add_simple_condition() protected method

Helper method to compile a simple COLUMN SEPARATOR VALUE style HAVING or WHERE condition into a string and value ready to be passed to the _add_condition method. Avoids duplication of the call to _quote_identifier
protected _add_simple_condition ( string $type, $column_name, $separator, $value )
$type string
    protected function _add_simple_condition($type, $column_name, $separator, $value)
    {
        // Add the table name in case of ambiguous columns
        if (count($this->_join_sources) > 0 && strpos($column_name, '.') === false) {
            $table = $this->_table_name;
            if (!is_null($this->_table_alias)) {
                $table = $this->_table_alias;
            }
            $column_name = "{$table}.{$column_name}";
        }
        $column_name = $this->_quote_identifier($column_name);
        return $this->_add_condition($type, "{$column_name} {$separator} ?", $value);
    }
ORM