android - Sqlite query using where condition having more than one condition to satisfy -


please find wrong here

here _id , chek column of db write query search has id =id , check =number

 public cursor query(int id){     return mydatabase.query("question", null,"_id = "+id+ "and " +  "chek ="+number,null, null, null, null);    } 

may you:

replace query these lines..

public cursor query(int id){ return mydatabase.query("question", null,"_id = "+id+ " , " +  "chek ="+number,null, null, null, null); 

keep space between double quotes in , :" , " otherwise string
example: _id=3and check =9


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -