rawQuery("select * from kechengbiao where week = ? and firstweek < ? and lastweek > ?", new String[]{weekday,"5","1"});
这样得到的SQL查询语句为:
select * from kechengbiao where week=weekday(这里应该是你的weekday代表的字符串) and firstweek < 5 and lastweek > 1
如果你想在SQL语句中使用字符串,需要在new String[]{}中修改,比如
rawQuery("select * from kechengbiao where kecheng = ?", new String[]{"'English'"});//注意English前后分别有一个双引号和一个单引号
得到的SQL查询语句为:
select * from kechengbiao where kecheng = 'English'
试试
new String[]{weekday, new Date(), new Date()}