[solved]: error generating a new album [solved]: error generating a new album
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[solved]: error generating a new album

Started by 200366, March 08, 2004, 03:05:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

200366

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

Joachim Müller

please post a link to your gallery and a test account of a user with upload permissions.

GauGau

Joachim Müller

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
QuoteThere 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

200366

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

Joachim Müller

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

200366

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

Casper

The aid row should not have a default of '0'.  It should be set for auto_increment in the extra's.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

200366

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