android - 根据价格从sqlite数据库中按升序获取排序数据

标签 android sqlite

<分区>

"SELECT * FROM " + PRO_TABLE + " WHERE "
                + PRO_CATID + "= '" + cat_id + "' " +" AND "+ PRO_CAT + "= '" + cat_name + "' " + " AND "
                + PRO_SUB_CATID + "= '" + subcat_id + "' ORDER BY "+ PRO_PP + " ASC ";

最佳答案

您应该使用 CAST

ORDER BY CAST(PRO_PP AS REAL) ASC 

关于android - 根据价格从sqlite数据库中按升序获取排序数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44040053/

相关文章:

python - 属性错误 : 'function' object has no attribute 'connect'

java - Android View 布局组件相互叠加

android - 如何让 Android SafetyNetClient.Attest 使用仅限于 Android 应用程序的 API key ?

android - 不能在 ListFragment 上使用 SimpleAdapter

ios - Sqlite.swift 过滤/查找

android SQLite 没有这样的表(代码 1)错误

android - MENU 中不允许元素 ITEM

Android gms.google.services 版本 (15.0.1) 与 Firebase Core 16.0.0 冲突

iOS 应用程序验证问题 : non-public API usage, libsqlite 使用

sqlite - Rack::Lint::LintError:状态必须 >=100 被视为整数