Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
androidsql语句中的多Where子句_Android_Sql_Sqlite_Where - Fatal编程技术网

androidsql语句中的多Where子句

androidsql语句中的多Where子句,android,sql,sqlite,where,Android,Sql,Sqlite,Where,我对Android的SQL语句有一些问题。基本上我有两个where子句,bookID和userID,以及我现在拥有的SQL语句: public boolean updateLoan(String bookID, String userID, String currentDate) { try { ContentValues cv = new ContentValues(); cv.put("loanDate", currentDate);

我对Android的SQL语句有一些问题。基本上我有两个where子句,bookID和userID,以及我现在拥有的SQL语句:

public boolean updateLoan(String bookID, String userID, String currentDate) {
    try {
        ContentValues cv = new ContentValues();
        cv.put("loanDate", currentDate);

        mDb.update("loanBook", cv,
                " bookID= '" + bookID + "'", null);

        return true;
    } catch (Exception ex) {
        Log.e(TAG, ex.toString());
        return false;
    }
}
所以我想知道如何在这个方法中放置两个where子句,因为目前我只能按bookID放置where子句。我是否简单地放置一个&并继续执行SQL语句


提前感谢。

我是否只需放置一个&并继续SQL语句


是的,用和代替&

对不起,我粗心的错误。谢谢!