SQLite compatibility implementation for the GREATEST() SQL function.
public static function sqlFunctionGreatest() { $args = func_get_args(); foreach ($args as $v) { if (!isset($v)) { unset($args); } } if (count($args)) { return max($args); } else { return NULL; } }