Problem with creating a table in phpmyadmin for nulavatar
-----
| Author | Message | |
|---|---|---|
|
HB. |
||
| Fri Jul 20, 2007 11:55 am Post subject: Problem with creating a table in phpmyadmin for nulavatar | ||
|
I don't know what I'm doing wrong, now every time I try to create a required table for nulavatar, I keep getting this error.
Quote: #1067 - Invalid default value for 'user'
The tables I'm trying to create are Code: CREATE TABLE `phpbb_nulavatar_userchars` (
`id` int(10) unsigned NOT NULL auto_increment, `user` int(10) unsigned NOT NULL default '', PRIMARY KEY (`id`) ); and Quote: #1067 - Invalid default value for 'dontshowlayer'
Code: CREATE TABLE `phpbb_nulavatar_images` (
`id` int(10) unsigned NOT NULL auto_increment, `name` mediumtext NOT NULL, `image` mediumtext NOT NULL, `layer` int(10) NOT NULL default '0', `itemneeded` mediumtext NOT NULL, `dontshowlayer` int(10) NOT NULL default '', PRIMARY KEY (`id`) ); Can anyone help me with this? |
||
|
Thoul |
||
| Fri Jul 20, 2007 4:15 pm Post subject: Re: Problem with creating a table in phpmyadmin for nulavata | ||
|
It's the same problem in both cases, so let's just look at the first one. This line of the query is incorrect:
Code: `user` int(10) unsigned NOT NULL default '',
You're creating an integer column (that's the int(10)) and using an empty string as the default (that's the default '' part). MySQL won't accept a string value in an integer column, so you get these errors. To fix it, you just need to change the default value to 0, like so: Code: `user` int(10) unsigned NOT NULL default 0,
|
||
|
HB. |
||
| Tue Jul 24, 2007 12:40 pm Post subject: Re: Problem with creating a table in phpmyadmin for nulavata | ||
|
Thank you very much! That did the trick
I'm gonna send you a PM about something sometime today. Thanks again |
||
Page 1 of 1