How to use ORM_Insert ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to use ORM_Insert ? (
/showthread.php?tid=593526)
How to use ORM_Insert ? -
xTremRaptor - 06.11.2015
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"
Код:
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);
I think it's not at all what I'm supposed to do lol, someone could help ?
Thanks
Re: How to use ORM_Insert ? -
xTremRaptor - 07.11.2015
nobody ?
Re: How to use ORM_Insert ? -
xTremRaptor - 07.11.2015
I've set it in the classic mysql format but I'd prefer to use ORM ..