View Single Post
  #2  
Old 03-25-2009, 01:57 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,551
BMR777 is on a distinguished road
Default RE: [In Development] Currency for leveling up

Well, using your system of altering the users table will break the user registration system. :P

You would want to also find in register2.php:

PHP Code:
mysql_query("INSERT INTO users VALUES ('', '$username', '$pass1','$email','free')"); 
Replace With:

PHP Code:
mysql_query("INSERT INTO users VALUES ('', '$username', '$pass1','$email','free','0')"); 
You need to add the extra column in there for the user's money. If the columns don't match, MySQL freaks out and new users are not registered correctly.

Also, I would change:

Code:
ALTER TABLE users
ADD money VARCHAR(11) NULL DEFAULT '0'
To:

Code:
ALTER TABLE users
ADD money INT
Use INT when only a number is expected. :)

Brandon