05.10.2014, 03:29
I did some reading and it said i should use setkey before using insert but still no luck
Quote:
[23:21:26] [DEBUG] orm_create - table: "dynamicdoors", connectionHandle: 1 [23:21:26] [DEBUG] COrm::Create - creating new orm object.. [23:21:26] [DEBUG] COrm::Create - orm object created (id: 9) [23:21:26] [DEBUG] orm_addvar_int - orm_id: 9, var: 04258C84, varname: "ID" [23:21:26] [DEBUG] orm_setkey - orm_id: 9, varname: "ID" [23:21:26] [DEBUG] orm_insert - orm_id: 9, callback: "OnDoorCreated", format: "d" [23:21:26] [DEBUG] CMySQLQuery::Execute[OnDoorCreated] - starting query execution [23:21:26] [ERROR] CMySQLQuery::Execute[OnDoorCreated] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`' at line 1 [23:21:26] [DEBUG] CMySQLQuery::Execute[OnDoorCreated] - error will be triggered in OnQueryError [23:21:26] [DEBUG] Calling callback "OnQueryError".. |
pawn Код:
new ORM:ormid = DynamicDoor[dd][ORM_ddID] = orm_create("dynamicdoors");
orm_addvar_int(ormid, DynamicDoor[dd][ddID], "ID");
orm_setkey(ormid, "ID");
orm_insert(DynamicDoor[dd][ORM_ddID], "OnDoorCreated", "d", dd);