sqlite - Android sqlight with multiple where -


i have following table column

public static final string showid = "show_id";     public static final string showname = "show_name";     public static final string showseason = "season_name";     public static final string episodename = "episode_name";     public static final string episodestatus = "episode_status"; 

i want following query

select episode_name , episode_status tv_show show_name='aname' , season_name='aseason'"; 

how this??

i don't want use db.rawquery(...)

i want use this

db.query(                 true,                 dbtable,                 new string[] {showseason},                  showname + " ?",                 new string[] { string.valueof(shname) },                 null, null, null, null                 ); 

this basic sql, quick search , find solution:

select episode_name , episode_status tv_show show_name='aname' , season_name='aseason'"; 

you have use and, not &

you can that, , replace '=' 'like' if needed:

cursor cursor = db.query(tvshow_table, new string[] { eposidename, episodestatus }, showname + "='" + aname + "' , " + seasonname + "='" + aseason + "'", null, null, null, null); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -