MySQL strange
#7

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
I don't see any 127. Show the code of how vehicleid variable was set when getting the vehicleid?
Код:
stock GetPlayerAvailableSlot(playerid)
{
	for(new i = 1, j = MAX_PLAYER_VEHICLES; i <= j; i++)
	{
	    format(smallmessage, sizeof(smallmessage), "VEHICLE%d", i);
	    if(GetPVarInt(playerid, smallmessage) == -1) return smallmessage;
	}
	return smallmessage;
}
Quote:
Originally Posted by Vince
Посмотреть сообщение
Field is probably set to tinyint. MySQL forces values in range. But you should probably rethink your database design anyway. Adding a number to a field name is bad. Using a string as a key is bad.
If i'll change the field to smallint you think it work? because when i tried to do:
Код:
format(message, sizeof(message), "UPDATE members SET %s='%d' WHERE Username = '%s'", slot, 100, getname[playerid]);
It work & put 100 in the field.
Reply


Messages In This Thread
MySQL strange - by AfikAtashga - 23.06.2014, 13:05
Re: MySQL strange - by AfikAtashga - 24.06.2014, 12:53
Re: MySQL strange - by kamiliuxliuxliux - 24.06.2014, 13:20
Re: MySQL strange - by AfikAtashga - 24.06.2014, 13:32
Re: MySQL strange - by Zex Tan - 24.06.2014, 13:56
Re: MySQL strange - by Vince - 24.06.2014, 15:07
Re: MySQL strange - by AfikAtashga - 24.06.2014, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)