src/xPDO/Om/xPDOQuery.php
public static function isValidClause($clause) {
        $output = rtrim($clause, ' ;');
        $output = preg_replace("/\\\\'.*?\\\\'/", '{mask}', $output);
        $output = preg_replace('/\\".*?\\"/', '{mask}', $output);
        $output = preg_replace("/'.*?'/", '{mask}', $output);
        $output = preg_replace('/".*?"/', '{mask}', $output);
        return strpos($output, ';') === false && strpos(strtolower($output), 'union') === false;
    }
public static function isValidClause($clause) {
        $output = rtrim($clause, ' ;');
        $output = preg_replace("/\\\\'.*?\\\\'/", '{mask}', $output);
        $output = preg_replace('/\\".*?\\"/', '{mask}', $output);
        $output = preg_replace("/'.*?'/", '{mask}', $output);
        $output = preg_replace('/".*?"/', '{mask}', $output);
        return strpos($output, ';') === false && strpos(strtolower($output), 'union') === false;
    }
public static function isValidClause ( $ clause ) { $ output = rtrim ( $ clause , ' ;' ) ; $ output = preg_replace ( "/\\\\'.*?\\\\'/" , '{mask}' , $ output ) ; $ output = preg_replace ( '/\\".*?\\"/' , '{mask}' , $ output ) ; $ output = preg_replace ( "/'.*?'/" , '{mask}' , $ output ) ; $ output = preg_replace ( '/".*?"/' , '{mask}' , $ output ) ; return strpos ( $ output , ';' ) === false && strpos ( strtolower ( $ output ) , 'union' ) === false ; }
Make sure a clause is valid and does not contain SQL injection attempts.

@param string $clause The string clause to validate.

@return bool True if the clause is valid.
Make sure a clause is valid and does not contain SQL injection attempts .