Hotel Registration ERROR - Help Needed ?

Dec 2, 2011
101
4
Hi all, my Hotel. When Someone Registers they Get this Error "" Field 'age' doesn't have a default value "", can someone please give me a FIX for it ?
 

BenHands

Member
Oct 10, 2011
200
38
Go to your users table, and look for the field "age", and it should say something along the lines of "Allow Null" if you have Navicat Premium, or for PHPMyAdmin, I'm not too sure.

Try this and see, I'm not sure.
 

BenHands

Member
Oct 10, 2011
200
38
Sorry, I am currently in School, and won't be home until 4pm at the latest. All you would need to do is go to your database, access your users table, right-click on users, scroll all the way down till you see age and then where it says DEFAULT: Click the drop down menu and click NULL and there should be a box to the right hand side of the database design saying "Allow Null" as I said before :)
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
193
Hi all, my Hotel. When Someone Registers they Get this Error "" Field 'age' doesn't have a default value "", can someone please give me a FIX for it ?
Go to your users table, and look for the field "age", and it should say something along the lines of "Allow Null" if you have Navicat Premium, or for PHPMyAdmin, I'm not too sure.

Try this and see, I'm not sure.
Alter table users add age int not null default(1);
 

Data

Posting Freak
May 19, 2013
593
97
Try run this, this should work.
Code:
ALTER TABLE `users` MODIFY COLUMN `age`  int(11) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '15'
 

Users who are viewing this thread

Top