concatenate SQL Where OR - Android Database

Android examples for Database:SQL Statement

Description

concatenate SQL Where OR

Demo Code


//package com.java2s;

import android.text.TextUtils;

public class Main {
    public static String concatenateWhereOR(String a, String b) {
        if (TextUtils.isEmpty(a)) {
            return b;
        }//from   ww w.  ja  v a  2  s  . c  om
        if (TextUtils.isEmpty(b)) {
            return a;
        }

        return "(" + a + ") OR (" + b + ")";
    }
}

Related Tutorials