Re: Adding channels fails in Jonah CVS HEAD
Chuck Hagenbuch <[email protected]> Wed, 19 Nov 2003 14:59:39 -0500
| Newsgroups | gmane.comp.horde.jonah |
|---|---|
| Message-ID | <[email protected]> |
Quoting Joe Jenkins <[email protected]>: > Adding channels in the News Admin fails with the error: > > There was an error saving the channel. DB Error: already exists > > Browsing the code for this function (below) I noticed it attempts to fetch > the next ID available in the table 'jonah_channels' ... This is not working > on my installation, I added some debugging code to echo the value of > $info['channel_id'] and what it is returning is not the next available ID in > that table. I browse my table and it should be '125' however this function > is returning 7,8,9 etc (it increments everytime I try to add a news channel, > even if the insert fails, dont ask me why!) Since channels exist at ID the > numbers returned by $this->_db->nextId('jonah_channels'); obviously it cant > insert a new record there and fails... Any idea what could be breaking > $this->_db->nextId('jonah_channels'); ? I am using a MySQL db and the rest > of my CVS HEAD Horde install seems to be working fine... Just update the sequence table to have the correct next ID in it. This will happen with the external_channels.sql file, since that doesn't go through the pear sequences. > ps: Why isnt this table just set to auto_increment the ID? Seems it would > be easier to work with, and the code that checks if a channel exists could > actually check to see if the XML/RSS url already exists on another channel, > thus eliminating channel duplicates... just a thought :) Because auto_increment is a completely non-portable, MySQL specific concept. -chuck -- Charles Hagenbuch, <[email protected]> "I'm really... I'm not too fascinated by green food." - Average Joe -- Jonah mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]