Clan Adverts

PHP Web Host - Quality Web Hosting For All PHP Applications

 

www.clan-themes.co.uk :: View topic - Inserting medal sql errors

 Welcome To Clan Themes 

As the board grows please remember the Search Option and we hope you find our community useful.

We also monitor Private Messages to stop members from abusing our sites system.
If you are asking for assistance please provide your site link and nuke version, Thanks.

Inserting medal sql errors

2 Replies / 209 Views


Post new topic   Reply to topic  

   www.clan-themes.co.uk Forum Index » Hacks n Mods

View previous topic :: View next topic


Zepherion
Reputation: 0.6
Local time: 10:26 AM

belgium.gif

Status: Offline
0.26 posts per day
Medals: 0

Joined: Jul 27, 2008
Last Visit: 21 Aug 2008
Posts: 20
Points: 588 

Post Inserting medal sql errors Posted: Mon Aug 04, 2008 7:54 pm   

Hi guys,

I'm currently trying to install the Medal mod on my forum boards (phpNuke site), First insert into MSQL worked fine but when trying to add the second bit phpMyAdmin came back with the below error message...
Code:
SQL-query:

CREATE TABLE `nuke_bbmedal_user` (

`issue_id` mediumint( 8 ) NOT NULL AUTO_INCREMENT ,
`medal_id` mediumint( 8 ) NOT NULL default '',
`user_id` mediumint( 8 ) NOT NULL default '',
`issue_reason` varchar( 255 ) NOT NULL default '',
`issue_time` int( 11 ) NOT NULL default '',
PRIMARY KEY ( `issue_id` )
) TYPE = MYISAM

MySQL retourneerde: 

#1067 - Invalid default value for 'medal_id'


Any ideas on how to fix this ?

Following inserts into MSQL failed aswell see errors below...

Code:
SQL-query:

CREATE TABLE `nuke_bbmedal_mod` (

`mod_id` mediumint( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
`medal_id` mediumint( 8 ) NOT NULL default '',
`user_id` mediumint( 8 ) NOT NULL default '',
PRIMARY KEY ( `mod_id` )
) TYPE = MYISAM

MySQL retourneerde: 

#1067 - Invalid default value for 'medal_id'


Thx for reading this.
 

 
View user's profileSend private messageVisit poster's website Reply with quote

floppy
Reputation: 1784.7
votes: 10
Local time: 4:26 AM
Location: Jackson Mississippi
usa.gif

Status: Offline
2.86 posts per day
Medals: 1 (View more...)
Dedicated User (Amount: 1)
Clan Themes Scripts/Coder
Clan Themes Scripts/Coder
Joined: Nov 14, 2006
Last Visit: 12 Oct 2008
Posts: 1994
Points: 29867 

Post Re: Inserting medal sql errors Posted: Tue Aug 05, 2008 3:23 am   

Shop Purchases:
Clan Roster 2.0

It is telling you that default blank ( so to speak will not work ), default needs a value like 1 or 0. I think in this case it would be 0, but don't quote me on it. Your best bet is to try 0 and then if that doesn't work try 1.

I think the actual syntax for sql would be
Code:
`issue_id` mediumint( 8 ) NOT NULL AUTO_INCREMENT ,
`medal_id` mediumint( 8 ) NOT NULL default 0'',
`user_id` mediumint( 8 ) NOT NULL default 0'',
`issue_reason` varchar( 255 ) NOT NULL default 0'',
`issue_time` int( 11 ) NOT NULL default '',
PRIMARY KEY ( `issue_id` )
) TYPE = MYISAM


Again don't quote me on that, I know nothing :(
 

Free Clan Links - Submit Yours today  
View user's profileSend private messageVisit poster's website Reply with quote

Zepherion
Reputation: 0.6
Local time: 10:26 AM

belgium.gif

Status: Offline
0.26 posts per day
Medals: 0

Joined: Jul 27, 2008
Last Visit: 21 Aug 2008
Posts: 20
Points: 588 

Post Inserting medal sql errors Posted: Tue Aug 05, 2008 8:46 pm   

Thx works now I used 0 as value but I did add it between brackets instead of before them ;)

Code:
CREATE TABLE `nuke_bbmedal_user` (
  `issue_id` mediumint(8) NOT NULL auto_increment,
  `medal_id` mediumint(8) NOT NULL default '0',
  `user_id` mediumint(8) NOT NULL default '0',
  `issue_reason` varchar(255) NOT NULL default '0',
  `issue_time` int(11) NOT NULL default '0',
  PRIMARY KEY  (`issue_id`)
) TYPE=MyISAM;


Worked perfect now. Thx again for the help!
 

 
View user's profileSend private messageVisit poster's website Reply with quote



Post new topic   Reply to topic  
   www.clan-themes.co.uk Forum Index » Hacks n Mods


 
2 Replies / 209 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum