4

I have 3 requests to the database, which return Cursor a,b,c. Sample query:

public Cursor SearchQueryMoscow (String query ){
         Cursor m;
          a = sqldb.query(true, DataBase.TABLE_NAME, new String[]{KEY_ROWID,ADRESS2,TIME2
                   ,PRICE2,OBJECT2,OPICANIE2,FINDWC2,DISTANSHIONMETRO2,CITY2},CITY2 + " IN ('ROMA') and ("
                    + " adress LIKE " + "'%" + query + "%'" 
                    + " OR gowc LIKE " + "'%" + query + "%'"
                    + " OR timework LIKE " + "'%" + query + "%'"
                    + " OR price LIKE " + "'%" + query + "%'"
                    + " OR mesto LIKE " + "'%" + query + "%'"
                    + " OR opicanie LIKE " + "'%" + query + "%'"
                    + " OR distanshionmetro LIKE " + "'%" + query + "%')"
                   , null, null, null, null, null); 
return a ;} 

Нow to combine the result of three cursors using MergeCursor? I wrote:

MergeCursor mergecursor = new MergeCursor(mCursors); 

how to further combine the results of three cursors? example seen

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Andrew
  • 43
  • 1
  • 4

0 Answers0