View Single Post
  #22  
Old 10-04-2011, 02:47 PM
Atmas Atmas is offline
Planar Protector


Join Date: Jun 2011
Location: In the bushes outside your window
Posts: 1,009
Default

Quote:
Originally Posted by Softcore PK [You must be logged in to view images. Log in or Register.]
the 84 days seemed to be part of an equation though..
(i know nothing about sql)
The code is looking for an existing account row with certain properties.

There is a comparison on these values "a.timelaston, UNIX_TIMESTAMP(),". I can assume by name a.timelaston is last login time and the UNIX_TIMESTAMP() is a current time stamp (what ever the time is when caled). I don't use MySQL. The function is subtracting the last login from the current time to see if the value is bigger than 84 days. Time is often stored in DBs as an incrememt of units from some starting point.

The "7257600" value I just made a guess was seconds cause other formats like milliseconds were impractical.

/60 = 120,960 minutes
/60 = 2016 hours
/24 = 84 days

I could be wrong, I'm making a couple of assumptions.

Edit for more clarifciation: The function is basically doing other checks on the status of the account (if it exists) to return a value as to whether or not you can create a character with this name. They include if an account is banned if and if it's the same account using that name.
__________________
60 Wixxor - Atmas
60 Paladin - Opmeter
54 Rogue - Ories
Some other toons
Formerly of TZ
Last edited by Atmas; 10-04-2011 at 02:56 PM..