Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   General Discussions (http://forums.winamp.com/forumdisplay.php?f=1)
-   -   mySQL error (http://forums.winamp.com/showthread.php?t=215005)

PulseDriver 5th May 2005 11:37

mySQL error
 
If know mySQL you probably know how to create a table. However, I get an error when installing Easymod to my database, and the error is:

PHP Code:

SQL-query

CREATE TABLE phpbb_easymod(
mod_id mediumintNOT NULL DEFAULT '0' AUTO_INCREMENT ,
mod_title varchar50 NULL DEFAULT '',
mod_file varchar255 NULL DEFAULT '',
mod_version varchar15 NULL DEFAULT '',
mod_author_handle varchar25 NULL DEFAULT '',
mod_author_email varchar100 NULL DEFAULT '',
mod_author_name varchar100 NULL DEFAULT '',
mod_author_url varchar100 NULL DEFAULT '',
mod_description text NULL DEFAULT '',
mod_process_date int11 NULL DEFAULT '0',
mod_phpBB_version varchar15 NULL DEFAULT '',
mod_processed_themes varchar200 NULL DEFAULT '',
mod_processed_langs varchar200 NULL DEFAULT '',
mod_files_edited mediumintNULL DEFAULT '0',
mod_tables_added mediumintNULL DEFAULT '0',
mod_tables_altered mediumintNULL DEFAULT '0',
mod_rows_inserted mediumintNULL DEFAULT '0',
PRIMARY KEY mod_id 


MySQL said:  
#1067 - Invalid default value for 'mod_id' 

Can anyone see an error here?

Leonhart 5th May 2005 11:42

Try changing the default value of mod id to 1.

PulseDriver 5th May 2005 11:45

I did, didn't work

. - .... .- -. .... 5th May 2005 11:55

replace
PHP Code:

mod_id mediumintNOT NULL DEFAULT '0' AUTO_INCREMENT 

with
PHP Code:

mod_id mediumint(8NOT NULL auto_increment

the fact that you declare mod_id as the primary key means that you can't give it a default value....

Leonhart 5th May 2005 11:56

Ah yes thats true i remember now. It has to be unique, no duplicates.

PulseDriver 5th May 2005 12:02

Okay :) I've already deleted that key, and it worked, but thanks for the effort :) Sure was what you said :)

. - .... .- -. .... 5th May 2005 12:03

It's a struggle always being right, but somehow I manage...







:p

PulseDriver 5th May 2005 12:27

Just preparing for making something huge :)

http://www.aocore.com/forums/

This is no forum (or at least it have no forums) so it's not available for posting ;) But at least I managed to install EasyMod into it :) If you're really bored, you can play with my cookies in my signature instead :p


All times are GMT. The time now is 08:54.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.