There is such a SQL query:

Cursor c = db.rawQuery("select * from "+DBH.DocK.TABLE_NAME+" where "+DBH.DocK.DC.DOC_ID+"='"+uniqueID+"'"+ " and where "+DBH.DocK.DC.TAB_ID+"='"+tabID+"'",null); 

It produces the following error:

 Caused By : SQL(query) error or missing database. (near "where": syntax error (code 1): , while compiling: select * from dock where file_id='fe485f5e-7b2a-11e6-a21d-984be174a0cc' and where tabID='1') 

What is wrong? Maybe I missed a quote somewhere or a space?

    1 answer 1

    Yes, you have a mistake.

    Correct request:

     select * from dock where file_id='fe485f5e-7b2a-11e6-a21d-984be174a0cc' and tabID='1' 

    And you:

     select * from dock where file_id='fe485f5e-7b2a-11e6-a21d-984be174a0cc' and **where** tabID='1' 
    • Exactly, thanks! - Lucky_girl