src/Database/Model.php
public function addWhere($field, $value, $op = 'AND')
    {
        if (!isset($this->sql['WHERE'])) {
            $this->sql['WHERE'] = [];
        }

        if (isset($this->sql['WHERE'][$op])) {
            $this->sql['WHERE'][$op][$field] = $value;
        } else {
            $this->sql['WHERE'][$field] = $value;
            $this->sql['WHERE'][$op] = $this->sql['WHERE'];
        }
    }
public function addWhere($field, $value, $op = 'AND')
    {
        if (!isset($this->sql['WHERE'])) {
            $this->sql['WHERE'] = [];
        }

        if (isset($this->sql['WHERE'][$op])) {
            $this->sql['WHERE'][$op][$field] = $value;
        } else {
            $this->sql['WHERE'][$field] = $value;
            $this->sql['WHERE'][$op] = $this->sql['WHERE'];
        }
    }
public function addWhere ( $ field , $ value , $ op = 'AND' ) { if ( ! isset ( $ this -> sql [ 'WHERE' ] ) ) { $ this -> sql [ 'WHERE' ] = [ ] ; } if ( isset ( $ this -> sql [ 'WHERE' ] [ $ op ] ) ) { $ this -> sql [ 'WHERE' ] [ $ op ] [ $ field ] = $ value ; } else { $ this -> sql [ 'WHERE' ] [ $ field ] = $ value ; $ this -> sql [ 'WHERE' ] [ $ op ] = $ this -> sql [ 'WHERE' ] ; } }
helper function to add condition into WHERE.
create the SQL Expressions.

@param string $field The field name, the source of Expressions
@param mixed  $value the target of the Expressions
@param string $op    the operator to concat this Expressions into WHERE or SET statment.
helper function to add condition into WHERE . create the SQL Expressions .