concatenate SQL Where AND - Android Database

Android examples for Database:SQL Statement

Description

concatenate SQL Where AND

Demo Code


//package com.java2s;

import android.text.TextUtils;

public class Main {
    public static String concatenateWhereAND(String a, String b) {
        if (TextUtils.isEmpty(a)) {
            return b;
        }/*from  w w w  . ja v  a2s . com*/
        if (TextUtils.isEmpty(b)) {
            return a;
        }

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

Related Tutorials