mojito Posted July 26, 2006 Share Posted July 26, 2006 Why is it that this very serious oversight isnt well documented. I mean I'm struggling like hell to understand why my sites break and then have to go through every single table to manually add auto increment to the field "extra". I export correctly with complete inserts and the other things but this never works. Incidentally I have to export to a lower version to avoid sql errors. Is this the problem?I would prefer to do it command line but not all hosts allow ssh in to their db.grrrrrr....Would appreciate some understanding on this thanks.PS there is no link to a forum on mysqlfreaks.com Quote Link to comment Share on other sites More sharing options...
fenway Posted July 27, 2006 Share Posted July 27, 2006 I'm not sure what you mean... complete inserts is the data, auto_increment is part of the table definition. Quote Link to comment Share on other sites More sharing options...
mojito Posted July 27, 2006 Author Share Posted July 27, 2006 so then its the table definition which is being incorectly written. I may post below an example of the sql for a table.[code]DROP TABLE IF EXISTS `default_classlistingsdb`;CREATE TABLE `default_classlistingsdb` ( `classlistingsdb_id` int(11) NOT NULL auto_increment, `class_id` int(11) NOT NULL default '0', `listingsdb_id` int(11) NOT NULL default '0', PRIMARY KEY (`classlistingsdb_id`), KEY `idx_classlistingsdb_class_id` (`class_id`), KEY `idx_classlistingsdb_listingsdb_id` (`listingsdb_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;-- -- Dumping data for table `default_classlistingsdb`-- INSERT INTO `default_classlistingsdb` VALUES (1, 1, 1);INSERT INTO `default_classlistingsdb` VALUES (2, 2, 2);[/code]I can see the auto increment value above, so it looks like it is being ignored.For some reason it seems to be working now, but im not crazy and it did this a previous encounter a month ago, and i ended up manually putting in the auto_increment.? Quote Link to comment Share on other sites More sharing options...
fenway Posted July 27, 2006 Share Posted July 27, 2006 That will work just fine (as it did on my 4.1.13a box)... I can't imagine why it's being "ignored" in your case. Quote Link to comment Share on other sites More sharing options...
mojito Posted July 27, 2006 Author Share Posted July 27, 2006 Thanks anyway fenway, I will post anything of interest on this, will no doubt come across it again.c Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.