Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2005
Posts: 35
P
newbie
newbie
P Offline
Joined: Jan 2005
Posts: 35
When running altertable from 6.3 to 6.4, this is what I get.. for some reason it is unable to create the tables because of an invalid p_id? Any help is appreciated

Code
Adding a new table to save database queries that are used frequently from the admin section
Adding a new field to the Groups table to allow for disabling of groups.
Grabbing all old poll data for conversion.
Dropping old poll tables and creating new ones for the updated poll system.
SQL ERROR: Unable to do_query: CREATE TABLE w3t_PollMain ( P_Id INT(11) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT PRIMARY KEY, P_Start INT(11) UNSIGNED, P_Stop INT(11) UNSIGNED, P_MustVote INT(1) UNSIGNED, P_NoResults INT(1) UNSIGNED ) 
Invalid default value for 'P_Id'SQL ERROR: Unable to do_query: CREATE TABLE w3t_PollQuestions ( P_QuestionNum INT(11) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT PRIMARY KEY, P_PollId INT(11), P_Question TEXT, P_ChoiceType VARCHAR(4) ) 
Invalid default value for 'P_QuestionNum'SQL ERROR: Unable to do_query: CREATE TABLE w3t_PollOptions ( P_OptionNum INT(11) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT PRIMARY KEY, P_QuestionNum INT(11) UNSIGNED NOT NULL, P_Option VARCHAR(255), P_PollId INT(11) UNSIGNED, INDEX Question_ndx(P_QuestionNum) ) 
Invalid default value for 'P_OptionNum'importing old poll data...
SQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','KOP then ATCO or just ATCO','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','KOP Lunch ---> ATCO late','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','ATCO early: lunch at the track','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','Do you trim your crutch hair?','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','YES','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','NO','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','Which of these?','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Flowmaster 40 Series','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Dynomax Super Turbo','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Dynomax Ultra Flow','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Those Cherry Bumbs','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Glass Packs','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','What you think?','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Good idea','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Bad idea','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Dead number, Edelbrock won\'t make anything, it is not worth trying. I\'d better spend my 35 cents on something else!','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','To Carpet or not to carpet....','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Should I Carpet the new floor?','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Or should I stain the wood and clear coat?','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','How about some spraypaint?','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','Choose a treatment :','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0',' 1','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0',' 2','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0',' 3','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0',' 4','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','SUB PLACEMENT','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Choice 1 - Subs facing up/forward','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Choice 2 - Subs facing back','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollQuestions (P_PollId,P_Question,P_ChoiceType) VALUES ('0','Who here smokes and how much?','one') 
Table 'ubb655.w3t_PollQuestions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','less than 1 pack','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','1 pack','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','1.5-2 packs','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','more than 2 packs','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','$3.50-$4','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','$4-$4.50','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','$4.50-$5','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','$5-$5.50','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','$5.50-$6','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','more than $6','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Yes','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','No','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','No plans of quitting','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Health','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','CV Mod money','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollOptions (P_QuestionNum,P_Option,P_PollId) VALUES ('0','Other','0') 
Table 'ubb655.w3t_PollOptions' doesn't existSQL ERROR: Unable to do_query: INSERT INTO w3t_PollMain (P_Start,P_Stop,P_MustVote,P_NoResults) VALUES ('1173521623','0','0','0') 
Table 'ubb655.w3t_PollMain' doesn't exist

Joined: Jan 2005
Posts: 35
P
newbie
newbie
P Offline
Joined: Jan 2005
Posts: 35
Ok, found my answer, the DEFAULT value on AUTO INCREMENT's cannot be set to zero... In case anyone else runs into this, just remove the default '0' from each create table entry.

Jason


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 744 guests, and 147 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)