CREATE TABLE IF NOT EXISTS rooms(roomid INTEGER NOT NULL PRIMARY KEY autoincrement,
roomname TEXT NOT NULL,roomexits TEXT,
roomuniquelevel INTEGER DEFAULT 1,
roomtype INTEGER DEFAULT 1,
roomdesc TEXT,roomext TEXT)
.......
insert into rooms(roomname,roomexits,roomtype,roomuniquelevel,roomdesc,roomext)
values('testroom','east|north',1,1,'hello room','test');
......
var ret = world.DatabaseExec("dbName",sql);
var _retNum = world.DatabaseLastInsertRowid("dbName");
world.note("ret is "+ ret);
window shows : "ret is"
that means after insert is done,and i can view the record in database,but i can't get the roomid's value by call world.DatabaseLastInsertRowid("dbName");
【question】 Am i worry use the function ? or the function has bug in javascript? thanks for help.
【remark】 language:js mushclient version: 4.82
-Just- read the help files on this stuff,so yeah... if you're not getting 0, then DatabaseExec failed in some way and you should use DataBaseError to get what's going on? Also, you did open the database some where before this code right? And, out of curiosity, is it legal to mix up the order of parameters like you are doing, as well as only give 5 of them in an insert?