21.02.2014, 20:02
Okay, so what I'm trying to do, for arguments sake is:
When a vehicle is INSERTED into the 'vehicles' table, retrieve the ID from the inserted row to save to a variable?
Also, if someone who has knowledge in this area of scripting could PM me with their skype name, it'd be rather handy as I have a few more questions just to verify my methods and whether they can be done easier... As it doesn't seem fit for me to create new threads each time I have a question! Haha.
When a vehicle is INSERTED into the 'vehicles' table, retrieve the ID from the inserted row to save to a variable?
pawn Код:
mysql_format(mysql, qString, sizeof(qString), "INSERT INTO `vehicles` (`Model`, `posX`, `posY`, `posZ`, `Angle`, `Colour1`, `Colour2`) VALUES ('%i', '%f', '%f', '%f', '%f', '%i', '%i')", vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vAngle], vInfo[i][vColour1], vInfo[i][vColour2]);
mysql_tquery(mysql, qString, "", "");
Also, if someone who has knowledge in this area of scripting could PM me with their skype name, it'd be rather handy as I have a few more questions just to verify my methods and whether they can be done easier... As it doesn't seem fit for me to create new threads each time I have a question! Haha.