forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: 200366 on March 08, 2004, 03:05:49 pm

Title: [solved]: error generating a new album
Post by: 200366 on March 08, 2004, 03:05:49 pm
My english is not so good. Please excuse.

I'am not able to generate a new album in a category.

After 16 albums, I want to generate two more. The album no. 17, which must have the aid 20 in cpg11d_albums, becomes the number aid 0.

+-----+----------------+-------------+------------+---------+----------+-------+-----+----------+-----------+
| aid | title          | description | visibility | uploads | comments | votes | pos | category | pic_count |
+-----+----------------+-------------+------------+---------+----------+-------+-----+----------+-----------+
|  0 | Test   |             |          0 | NO      | YES      | YES   | 100 |       12 |         0 |
+-----+----------------+-------------+------------+---------+----------+-------+-----+----------+-----------+

From now every album I generate tries to insert aid 0, wich ends with an error.

While executing query "INSERT INTO cpg11d_albums (category, title, uploads, pos) VALUES ('12', 'test1', 'NO',  '101')" on 0

mySQL error: Duplicate entry '0' for key 1




Can anyone give me a hint?

Chris
Title: [solved]: error generating a new album
Post by: Joachim Müller on March 08, 2004, 07:29:46 pm
please post a link to your gallery and a test account of a user with upload permissions.

GauGau
Title: [solved]: error generating a new album
Post by: Joachim Müller on March 10, 2004, 01:31:44 am
you were suppossed to post the link and test account, not pm me (I'd have instructed you to pm me if I needed an admin account). I get an error
Quote
There was an error while processing a database query
when trying to create an album - switch on debug mode and check the output when the error happens. Post it here (no pm!), as well as a link to your board and a test account for all supporters.

GauGau
Title: ....
Post by: 200366 on March 10, 2004, 12:07:02 pm
ah .. ok .. i'm sorry.

http://www.thissiadis.de/myalbum

user:          copper
password:   mine

Hope i made the right settings for this testuser. Debug mode is enabled.

The error message above in this thread is the only message i've got.

Chris
Title: [solved]: error generating a new album
Post by: Joachim Müller on March 11, 2004, 07:40:21 am
I think there's a problem with your mySQL tables. Could you create a dump of the table structure (with phpMyAdmin) and post it here?

GauGau
Title: ...
Post by: 200366 on March 11, 2004, 11:18:27 am
This is the export of the table ´cpg11d_albums´.


CREATE TABLE `cpg11d_albums` (
  `aid` int(11) NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `description` text NOT NULL,
  `visibility` int(11) NOT NULL default '0',
  `uploads` enum('YES','NO') NOT NULL default 'NO',
  `comments` enum('YES','NO') NOT NULL default 'YES',
  `votes` enum('YES','NO') NOT NULL default 'YES',
  `pos` int(11) NOT NULL default '0',
  `category` int(11) NOT NULL default '0',
  `pic_count` int(11) NOT NULL default '0',
  `thumb` int(11) NOT NULL default '0',
  `last_addition` datetime NOT NULL default '0000-00-00 00:00:00',
  `stat_uptodate` enum('YES','NO') NOT NULL default 'NO',
  PRIMARY KEY  (`aid`),
  KEY `alb_category` (`category`)
) TYPE=MyISAM;

#
# Daten für Tabelle `cpg11d_albums`
#

INSERT INTO `cpg11d_albums` VALUES (10, 'xxxxx', '', 14, 'NO', 'YES', 'YES', 106, 3, 0, 673, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (3, 'xxxxx', '', 6, 'NO', 'YES', 'YES', 100, 3, 0, 1, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (8, 'xxxxx', '', 6, 'NO', 'YES', 'YES', 104, 3, 0, 0, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (4, 'xxxxx, '', 6, 'NO', 'YES', 'YES', 101, 3, 0, 207, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (5, 'xxxxx', '', 6, 'NO', 'YES', 'YES', 102, 3, 0, 366, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (6, 'xxxxx', '', 6, 'NO', 'YES', 'YES', 103, 3, 0, 362, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (9, xxxxx', '', 6, 'NO', 'YES', 'YES', 105, 3, 0, 470, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (11, 'xxxxx', '', 11, 'NO', 'YES', 'YES', 100, 10, 0, 763, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (12, 'xxxxx', '', 0, 'NO', 'YES', 'YES', 101, 10, 0, 0, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (13, 'xxxxx', '', 12, 'NO', 'YES', 'YES', 102, 10, 0, 798, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (14, 'xxxxx', '', 0, 'NO', 'YES', 'YES', 103, 10, 0, 0, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (15, 'xxxxx', '', 0, 'NO', 'YES', 'YES', 104, 10, 0, 0, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (16, 'xxxxx', '', 8, 'NO', 'YES', 'YES', 100, 11, 0, 1061, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (17, 'xxxxx', '', 9, 'NO', 'YES', 'YES', 101, 11, 0, 1099, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (18, 'Mailand', '', 10, 'NO', 'YES', 'YES', 102, 11, 0, 1079, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (19, 'Mailand', '', 13, 'NO', 'YES', 'YES', 105, 10, 0, 0, '0000-00-00 00:00:00', 'NO');
INSERT INTO `cpg11d_albums` VALUES (0, 'test', '', 0, 'NO', 'YES', 'YES', 100, 12, 0, 0, '0000-00-00 00:00:00', 'NO');

Chris
Title: [solved]: error generating a new album
Post by: Casper on March 11, 2004, 11:32:56 am
The aid row should not have a default of '0'.  It should be set for auto_increment in the extra's.
Title: ...
Post by: 200366 on March 11, 2004, 11:55:16 am
yepp ... that was the problem!!!!!

How does it happend?????


But now it works. Thanks a lot for your help.
This is the best example, why it is so important to have a forum like this.

Chris