SA-MP Forums Archive
MySql Insert into two tables - 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: MySql Insert into two tables (/showthread.php?tid=339146)



MySql Insert into two tables - Deal-or-die - 02.05.2012

Can i have two format strings in one query?
pawn Код:
format(query,sizeof(query), "INSERT INTO `Vehiclekeys` (ID,Vehicle,Linked,Type) VALUES '%d','%d','%s','%d')",i,
                    format(query,sizeof(query), "INSERT INTO `Vehicles` (ID,VehicleID,ModelID,PositionX,PositionY,PositionZ,AngleZ,Color1,Color2,Plate) VALUES('%d','%d','%d', '%f','%f','%f','%f','%d','%d','%s')",i,car,model,x,y,z,a,c1,c2,DEFAULT_PLATE);
                    mysql_query(query);
EDIT:

Nevermind, solved