Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved]Code question (involves MySQL sorta)
#5
Cruzn Wrote:Are you really worried about having 500 entries into a table? Pointless to try and reuse numbers. It would be more work then just finding the last entry of the table and adding 1. Think about it. . . "Last number is 500, let me go back through each and every one to see if there is one I can reuse. . ." or "Last number is 500, 501 kthxbai." Why would you reuse numbers? Unless you constantly look through to find the IDs or stuff, you don't have do that. Just call the backpack data by their ID, which would be stored in their account information, no?

There would be no limit as to how many backpacks one could own so those with higher levels that were allowed to carry more weight could carry 20 backpacks all filled with items. Eventually the database would get gigantic and I would like to recycle the titles to prevent bloat come backup time. Obviously this isn't an immediate issue but why wait for something to go wrong?


[Edit]

After re-reading your comment I see that this could be used for malicious attacks also... perhaps I will rethink this system

[Edit]

Ok I think I got it this time! Tell me what you think. Come daily server reset it would run code that would rename all the backpacks in the database to a lower number and continue from the last one. That way I don't need to worry about an oversized variable (was my main concern). Unless I'm totally missing an easier way to do this. =/
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)