2010-07-06 23 views

回答

0

這個post有獲取sqlite中自動增量鍵的值的細節。那是你的追求?

+0

關閉,但這是運行Google Gears的Javascript。這是我需要的: http://code.google.com/apis/gears/api_database.html#Database-lastInsertRowId? – Hamster 2010-07-07 08:52:40

+0

是的,它看起來會起作用。這裏有一篇文章,http://blog.brianflove.com/articles/2008/07/14/google-gears-presentation/,其中一些示例代碼使用齒輪運行,使用lastInsertRowId進行插入和獲取id。 (',',?,?)',[$ F('firstname'),$ F('lastname'),$ F('insert into Users(firstname,lastname,Description,Timestamp)values ('Description'),new Date()。getTime()]); lastid = db.lastInsertRowId; – 2010-07-07 09:44:29