添加新字段应用程序崩溃

时间:2018-03-18 03:17:31

标签: android

我正在撰写以下查询

Cursor cursor = db.rawQuery("SELECT fatkgrate FROM " + DatabaseHelper.TABLE_NAME3 + " WHERE " +
                                "cast(" + msnf + " as integer) between  fromsnf AND tosnf " +
                                "and  cast(" + mfat + " as integer) between  fromfat AND tofat " +
                                " "
                        ,null );

工作正常,但当我在我的应用程序崩溃后添加牛的地方

Cursor cursor = db.rawQuery("SELECT fatkgrate FROM " + DatabaseHelper.TABLE_NAME3 + " WHERE " +
                                "cast(" + msnf + " as integer) between  fromsnf AND tosnf " +
                                "and  cast(" + mfat + " as integer) between  fromfat AND tofat " +
                                "and cattle = cast(" + mcattlez + " as text) "
                        ,null );

0 个答案:

没有答案