【发布时间】:2011-06-29 22:20:36
【问题描述】:
我在我的 sqlite 中通过选择获得的结果有问题。
我已经有一个数据库,我正在 adobe air 中的应用程序中进行查询。在我的表格中,我有 6 列:
id | name | email | CITY_ID | state_id | phone
当我选择整个表格时,它会返回一个对象数组。
result[30].id = 30;
result [30]. name = John;
result [30]. email = john@xxx.com;
result [30]. city_id = 1352;
result [30]. state_id = 352;
result [30]. phone = xxxxxxxxx;
所有信息都正确,但 id 值不正确(正确的不是 30 )。在我看来,我得到的是数字顺序而不是 id 列值。
有人遇到过这个问题吗?
更新
我的查询是:
_selectStat = new SQLStatement();
_selectStat.addEventListener( SQLEvent.RESULT, onDataLoaded );
_selectStat.addEventListener( SQLErrorEvent.ERROR, onSqlError );
_selectStat.sqlConnection = _connection;
var sql:String = 'SELECT * FROM "main"."agencia"';
_selectStat.text = sql;
_selectStat.execute();
【问题讨论】:
-
Hy locrizak,我更新了查询。
标签: sql actionscript-3 sqlite air