public function addWhere($field, $value, $sign = '=', $whereConcat = 'AND')
    {
        $fieldWhere = (0 < count($this->wheres) ? ' ' . $whereConcat . ' ' . $field : $field);
        $fieldBind  = ':' . strtolower($field);

        if (isset($this->binds[$fieldBind])) {
            $counter = 0;
            while ($counter < 20) {

                if (isset($this->binds[$fieldBind . '__' . $counter++])) {
                    continue;
                }

                $fieldBind .= '__' . $counter;
                break;
            };
        }

        $this->wheres[]          = $fieldWhere . ' ' . $sign . ' ' . $fieldBind;
        $this->binds[$fieldBind] = $value;

        return $this;
    }
public function addWhere($field, $value, $sign = '=', $whereConcat = 'AND')
    {
        $fieldWhere = (0 < count($this->wheres) ? ' ' . $whereConcat . ' ' . $field : $field);
        $fieldBind  = ':' . strtolower($field);

        if (isset($this->binds[$fieldBind])) {
            $counter = 0;
            while ($counter < 20) {

                if (isset($this->binds[$fieldBind . '__' . $counter++])) {
                    continue;
                }

                $fieldBind .= '__' . $counter;
                break;
            };
        }

        $this->wheres[]          = $fieldWhere . ' ' . $sign . ' ' . $fieldBind;
        $this->binds[$fieldBind] = $value;

        return $this;
    }
public function addWhere ( $ field , $ value , $ sign = '=' , $ whereConcat = 'AND' ) { $ fieldWhere = ( 0 < count ( $ this -> wheres ) ? ' ' . $ whereConcat . ' ' . $ field : $ field ) ; $ fieldBind = ':' . strtolower ( $ field ) ; if ( isset ( $ this -> binds [ $ fieldBind ] ) ) { $ counter = 0 ; while ( $ counter < 20 ) { if ( isset ( $ this -> binds [ $ fieldBind . '__' . $ counter ++ ] ) ) { continue ; } $ fieldBind .= '__' . $ counter ; break ; } ; } $ this -> wheres [ ] = $ fieldWhere . ' ' . $ sign . ' ' . $ fieldBind ; $ this -> binds [ $ fieldBind ] = $ value ; return $ this ; }
Add where clause.

@param  string         $field
@param  string|integer $value
@param  string         $sign
@param  string         $whereConcat
@return self
Add where clause .