public function where($condition, $value = null, $type = null)
    {

        switch ($type) {
            case null:
                $clause = 'WHERE';
                break;
            case 'or':
                $clause = 'OR';
                break;
            case 'and':
                $clause = 'AND';
                break;
            default:
                $clause = 'WHERE';
        }

        $this->oosql_where .= " $clause $condition";

        if ($value instanceof oosql) {

            $this->oosql_where .= $value->getSql();
        } elseif (null !== $value) {

            $this->oosql_conValues[] = $value;
        }

        return $this;
    }
public function where($condition, $value = null, $type = null)
    {

        switch ($type) {
            case null:
                $clause = 'WHERE';
                break;
            case 'or':
                $clause = 'OR';
                break;
            case 'and':
                $clause = 'AND';
                break;
            default:
                $clause = 'WHERE';
        }

        $this->oosql_where .= " $clause $condition";

        if ($value instanceof oosql) {

            $this->oosql_where .= $value->getSql();
        } elseif (null !== $value) {

            $this->oosql_conValues[] = $value;
        }

        return $this;
    }
public function where ( $ condition , $ value = null , $ type = null ) { switch ( $ type ) { case null : $ clause = 'WHERE' ; break ; case 'or' : $ clause = 'OR' ; break ; case 'and' : $ clause = 'AND' ; break ; default : $ clause = 'WHERE' ; } $ this -> oosql_where .= " $clause $condition" ; if ( $ value instanceof oosql ) { $ this -> oosql_where .= $ value -> getSql ( ) ; } elseif ( null !== $ value ) { $ this -> oosql_conValues [ ] = $ value ; } return $ this ; }
Assembles a WHERE clause
@param string $condition
@param string $value
@param string $type
@return \Phiber\oosql\oosql
Assembles a WHERE clause