06.11.2015, 16:59
Hi !
I'm trying to use the ORM system because it looks really better & simple
Buuuut, even if the Wiki is full of information, I don't understand how I'm supposed to insert values in my SQL table ?
In my case, I want to add the car's information into the table "cars"
I think it's not at all what I'm supposed to do lol, someone could help ?
Thanks
I'm trying to use the ORM system because it looks really better & simple
Buuuut, even if the Wiki is full of information, I don't understand how I'm supposed to insert values in my SQL table ?
In my case, I want to add the car's information into the table "cars"
Код:
new ORM:ormid = orm_create("cars");
orm_addvar_int(ormid, Vehicle[VID][Model], "id");
orm_addvar_int(ormid, Vehicle[VID][Color1], "cor");
orm_addvar_int(ormid, Vehicle[VID][Color2], "cor1");
orm_addvar_int(ormid, Vehicle[VID][Job], "job");
orm_addvar_int(ormid, Vehicle[VID][Faction], "faction");
orm_addvar_string(ormid, Vehicle[VID][Owner],24, "owner");
orm_insert(Vehicle[VID][ORM_ID], "OnVehicleCreated", "ddddds",id,cor,cor1,job,faction,owner);
Thanks
