public function prepareWhere($wheres = null)
    {
        if (isset($wheres)) {
            if (!empty($wheres)) {
                $wheres = ' WHERE '.implode(' and ', array_values($wheres));
            } else {
                $wheres = '';
            }
        } else {
            $wheres = '';
        }

        return $wheres;
    }
public function prepareWhere($wheres = null)
    {
        if (isset($wheres)) {
            if (!empty($wheres)) {
                $wheres = ' WHERE '.implode(' and ', array_values($wheres));
            } else {
                $wheres = '';
            }
        } else {
            $wheres = '';
        }

        return $wheres;
    }
public function prepareWhere ( $ wheres = null ) { if ( isset ( $ wheres ) ) { if ( ! empty ( $ wheres ) ) { $ wheres = ' WHERE ' . implode ( ' and ' , array_values ( $ wheres ) ) ; } else { $ wheres = '' ; } } else { $ wheres = '' ; } return $ wheres ; }
prepare the where statement.

@param 'wheres' Specify a selection criteria to get required records

@return query
prepare the where statement .