SQLite compatibility implementation for the IF() SQL function.
public static function sqlFunctionIf($condition, $expr1, $expr2 = NULL) { return $condition ? $expr1 : $expr2; }