Android SQL查询无法正常工作

时间:2016-03-10 08:26:01

标签: android sqlite

我对我的应用有疑问

sqlStr = "SELECT * FROM " + getName() + " WHERE " + FIRST_NAME + " LIKE '%" + fname + "%' OR " + LAST_NAME + " LIKE '%" + lname + "%' OR "
                + AREA_PRAC + " LIKE '%" + location + "%' AND " + REGION + " = '" + region + "'";

示例查询:

SELECT * FROM view_member_list WHERE l_name LIKE "%Mend%" AND region  = "Region V"

在SqliteManager中,它显示数据为"%Mend%"在f_name或l_name或位置AND与"区域V"。但是当我在我的应用程序上使用它时。结果是不同的。它似乎绕过了第二个条件:

"AND region = 'Region V' "

0 个答案:

没有答案