var insertReq:SQLStatement = new SQLStatement();
insertReq.addEventListener(SQLErrorEvent.ERROR, dbErrorHandler);
insertReq.sqlConnection = conn;
insertReq.text = "INSERT INTO table1 (inputTime) VALUES (DATETIME('now'))";
insertReq.execute();
insertReq.text = "SELECT last_insert_rowid() as ID";
insertReq.execute();
var lastInsertId:int = insertReq.getResult().data[0].id;
trace(lastInsertId);
我创建了一个本地数据库,我正在尝试插入一些数据,但我得到了lastInsertId
零?!我在哪里搞砸了!?