protected function formatWhereClause($where)
    {
        if (!empty($where)) {
            if (stripos($where, 'where') === false || stripos($where, 'select') !== false) {
                $where = ' where ' . $where;
            }
        }

        return $where;
    }
protected function formatWhereClause($where)
    {
        if (!empty($where)) {
            if (stripos($where, 'where') === false || stripos($where, 'select') !== false) {
                $where = ' where ' . $where;
            }
        }

        return $where;
    }
protected function formatWhereClause ( $ where ) { if ( ! empty ( $ where ) ) { if ( stripos ( $ where , 'where' ) === false || stripos ( $ where , 'select' ) !== false ) { $ where = ' where ' . $ where ; } } return $ where ; }
Some simple checks for a where clause

@param $where
@return string
Some simple checks for a where clause