Query too long
#7

Quote:
Originally Posted by Haydz
Посмотреть сообщение
Hey Jimmy, it's been awhile ! Another way would be removing a few of what you're saving and save them separately when they need to be saved.

E.G
`admin` - You'd only need to save that whenever it gets changed, so upon the promoting / demoting admin command just save it then.
`score` - Depending how often a player gets score it might not really matter but you could create your own score function and save the new score var when they're given a score.
`money` - Similar to above, save the players money value whenever they gain / lose money. This way their money data will be up to date if the server happens to crash and the server can't save the data that occoured after the last saving point.

Exp, Level, Kills Deaths - You get the point, save it when the player gets killed / kills somebody else.

Now your query is only 419 characters long, allow some space for the larger values (many 50-80 characters or so). There's nothing wrong with a decent sized query, it has to be saved somehow lol.

pawn Код:
UPDATE `members` SET `weapon1` = %d, `ammo1` = %d, `weapon2` = %d, `ammo2` = %d, `weapon3` = %d, `ammo3` = %d, `weapon4` = %d, `ammo4` = %d, `weapon5` = %d, `ammo5` = %d, `weapon6` = %d, `ammo6` = %d, `weapon7` = %d, `ammo7` = %d, `weapon8` = %d, `ammo8` = %d, `weapon9` = %d, `ammo9` = %d, `weapon10` = %d, `ammo10` = %d, `weapon11` = %d, `ammo11` = %d, `weapon12` = %d, `ammo12` = %d WHERE `id` = %d LIMIT 1
That will help me out a bit more, thanks Hayden!
Reply


Messages In This Thread
Query too long - by Jimmy0wns - 28.06.2014, 20:00
Re: Query too long - by sammp - 28.06.2014, 20:06
Re: Query too long - by Jimmy0wns - 28.06.2014, 20:15
Re: Query too long - by Vince - 28.06.2014, 22:00
Re: Query too long - by Jimmy0wns - 29.06.2014, 08:10
Re: Query too long - by Haydz - 29.06.2014, 08:45
Re: Query too long - by Jimmy0wns - 29.06.2014, 10:28

Forum Jump:


Users browsing this thread: 2 Guest(s)