MySQL db Code

Feb 3, 2013
56
3
Can someone make me a MySQL code to Run that would add the table USERS, I want to Add age country role pease help

Something like this i found this image on the web
3cP8Sqx.png


I did try but when i tried registering i got
field 'age' doesn't have a default value
 

Jerry

not rly active lol
Jul 8, 2013
1,956
522
Code:
ALTER TABLE `users` ADD `age` VARCHAR(10) NOT NULL;
ALTER TABLE `users` ADD `position` VARCHAR(30) NOT NULL default 'Hotel User';
ALTER TABLE `users` ADD `country` VARCHAR(55) NOT NULL default 'Unknown';
 
Feb 3, 2013
56
3
Right thas fine now
but when i try to fetch from the database it doesnt show my guy on staff
Code:
$getMembers = mysql_query("SELECT id,username,motto,look,account_created,online,last_online,role,age,country FROM users WHERE rank = '" . $Ranks['id'] . "'");
but when it is
Code:
$getMembers = mysql_query("SELECT id,username,motto,look,online,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'");
it shows my guy but obviously it cant pull role age or country any ideas
 

Users who are viewing this thread

Top