Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: checkFixedCard Arguments: Description: Page type: webl Render function: Module: sandbox Page source: // Get a reference to a named database. This command either creates a new one or accesses an existing one. var db = Wub_GetDB("magicCardTrick"); // Get a reference to a collection (like a table). var coll = Wub_GetCollection(db, "fixedCard"); // Create a DB Object (row) to insert into the collection. // var dbobj = Wub_NewDBObject([. suit=suit, number=number .]); // Wub_InsertDB(coll, dbobj); // To query the database, create a query object and call the QueryDB function: var dbobj = Wub_NewDBObject([. .]); var res = Wub_QueryDB(coll, dbobj, 1); // 20 = max results // Delete database Wub_DropDB("magicCardTrick"); if Size(res) == 1 then res[0] else nil end;