SA-MP Forums Archive
MySQL question - 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 question (/showthread.php?tid=423675)



MySQL question - PaulDinam - 18.03.2013

Is the format correct or not?

pawn Код:
stock LoadVehicleFromSlot(playerid, slot)
{
    new query[500];
    format(query, sizeof(query), "SELECT * FROM `ownedvehicles` WHERE `owner` = '%s' AND `slot` = %d", GetName(playerid), slot);
    mysql_function_query(dbHandle, query, true, "OnPlayerSpawnVehicle", "ii", playerid, slot);
    return 1;
}



Re: MySQL question - Konstantinos - 18.03.2013

Yes, it's fine.


Re: MySQL question - Djole1337 - 18.03.2013

Huge "query". Make it 128.


Re: MySQL question - kamzaf - 18.03.2013

128 or just to be save 200 or 256 is enough. Your ruining about 300 cells with that query!