Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Field 'ip_last' doesn't have a default value

Experienced Elementalist
Joined
Nov 25, 2012
Messages
270
Reaction score
17
HELP FAST PLEASE! I'm using bcstorm db on ubercms!
 
Initiate Mage
Joined
Dec 14, 2009
Messages
60
Reaction score
10
Add and mysql query for ip_last when making an account. Go to /inc and then open class_users.php. Search for this:
function Add($username = '', $passwordHash = '', $email = 'default@localhost', $rank = 1, $figure = '', $sex = 'M')
Under that add this:
{
dbquery("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,credits,activity_points,account_created,last_online,ip_reg,ip_last) VALUES ('" . $username . "','" . $passwordHash . "','" . $email . "','','" . $rank . "','" . $figure . "','" . $sex . "','','STARTING CREDITS HERE','STARTING PIXELS HERE','" . date('d-M-Y') . "', UNIX_TIMESTAMP() ,'" .$_SERVER['REMOTE_ADDR'] . "','" .$_SERVER['REMOTE_ADDR'] . "')");
$id = intval(mysql_result(dbquery("SELECT id FROM users WHERE username = '" . $username . "' ORDER BY id DESC LIMIT 1"), 0));
dbquery("INSERT INTO user_info (user_id,bans,cautions,reg_timestamp,login_timestamp,cfhs,cfhs_abusive) VALUES ('" . $id . "','0','0','" . time(). "','" . time() . "','0','0')");
return $id;
}
Where it says 'STARTING CREDITS HERE' and 'STARTING PIXELS HERE' fill in the value what the user receives after he/she makes an account.

Lolislol
 
Upvote 0
Experienced Elementalist
Joined
Jul 22, 2012
Messages
298
Reaction score
221
Add and mysql query for ip_last when making an account. Go to /inc and then open class_users.php. Search for this:

Under that add this:

Where it says 'STARTING CREDITS HERE' and 'STARTING PIXELS HERE' fill in the value what the user receives after he/she makes an account.

Lolislol

Or you could just set a default value for ip_last as 0 via the database? It worked for him.
 
Upvote 0
Back
Top