dennismonsewicz Posted December 16, 2008 Share Posted December 16, 2008 I have a joomla component i have custom built but for some reason when it installs the main menu for the admin the main menu link does not auto increment in the DB (row id). Everything else does though. I understand that this is a third party script question but the auto incrementing is where my problem lies.. any help? Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/ Share on other sites More sharing options...
revraz Posted December 16, 2008 Share Posted December 16, 2008 There really is nothing to it. Set it in your DB and when you do a insert, make sure you don't add to that field. Many people will add it to their insert statement as a NULL or ' ', but just exclude it altogether. Also, can't help you much without seeing the code that pertains to your issue. Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-716989 Share on other sites More sharing options...
dennismonsewicz Posted December 16, 2008 Author Share Posted December 16, 2008 well the way the Joomla backend loads the menu structure into the DB is by an XML file here is the bit of code containing the XML code: <menu>Tmo Deductible</menu> <submenu> <menu link="option=com_tmodeductible§ion=phoneplan">Phone Deductibles</menu> <menu link="option=com_tmodeductible§ion=plan_by_state">Deductibles By State</menu> </submenu> The submenu's rowid auto increments in the DB bu the main menu does not Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-716993 Share on other sites More sharing options...
revraz Posted December 16, 2008 Share Posted December 16, 2008 That code has nothing to do for writing to the DB. Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-717001 Share on other sites More sharing options...
dennismonsewicz Posted December 16, 2008 Author Share Posted December 16, 2008 well like i said its Joomla's way of doing things. It somehow inserts that bit of information in one of the SQL tables Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-717015 Share on other sites More sharing options...
revraz Posted December 16, 2008 Share Posted December 16, 2008 That code doesn't. Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-717018 Share on other sites More sharing options...
dennismonsewicz Posted December 16, 2008 Author Share Posted December 16, 2008 i figured out my problem This line was in the install SQL file: SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; i commented it out and everything works like a charm! Link to comment https://forums.phpfreaks.com/topic/137239-solved-not-auto-incrementing-in-db/#findComment-717031 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.