inCondition and !$this->conditionIsTrue) return $this; if(!preg_match('/^[a-zA-Z0-9_`\.,\s]+$/', $groupBy)) { $groupBy = htmlspecialchars($groupBy); die("Group is bad query, The group is $groupBy"); } $this->sql .= ' ' . DAO::GROUPBY . " $groupBy"; return $this; } }