Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Forums ⇒ CMS (All) ⇒ FAQ (Frequently Answered Questions) :: Archives ⇒ a database error has occurred :: Archived


a database error has occurred :: Archived
Posts are moved here if they have been answered many times before in the forums, or if they exist in our FAQ or documentation. Posts in this forum may be deleted after 90 days.
Go to page Previous  1, 2
Topic Archived View previous topic :: View next topic  
Author Message
ARSLANTURK
Newbie
Newbie

Offline Offline
Joined: Jul 16, 2006
Posts: 12
Location: Turkiye
PostPosted: Wed Jul 19, 2006 10:36 pm
Post subject: Re: a database error has occurred

and auto_increment on rank_id ABSENT.



WHAT DO I ?


ARSLANTURK's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
php
Back to top
View user's profile Visit poster's website
dcollis
Heavy poster
Heavy poster

Offline Offline
Joined: Mar 18, 2005
Posts: 230

PostPosted: Wed Jul 19, 2006 10:39 pm
Post subject: Re: a database error has occurred

Yes, thats right.
It needs to be set to AUTO_INCREMENT.
You need to do the same for any other table that is missing it on the ID field. (which might mean all of them).


dcollis's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux//4.0.27/4.4.2/9.0.6.1
Back to top
View user's profile Visit poster's website
ARSLANTURK
Newbie
Newbie

Offline Offline
Joined: Jul 16, 2006
Posts: 12
Location: Turkiye
PostPosted: Wed Jul 19, 2006 10:42 pm
Post subject: Re: a database error has occurred

okey okey okey. I do ranks. Thanks all. Smile


ARSLANTURK's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
php
Back to top
View user's profile Visit poster's website
djdevon3
Gold Supporter
Gold Supporter

Offline Offline
Joined: Aug 05, 2004
Posts: 4363

PostPosted: Wed Jul 19, 2006 11:43 pm
Post subject: Re: a database error has occurred

bigern75 wrote:
here's his error:

Code::
includes/functions/display.php
CMS Warning line 163: block-Exchange.php
Þu an bu blokta bir sorun var.
includes/db/db.php
CMS Warning line 51: On /admin.php?op=ranks While executing query "INSERT INTO cms_bbranks (rank_title, rank_special, rank_min, rank_image) VALUES ('Moderatör', 1, -1, 'images/ranks/stars-3.png')" the following error occured: Duplicate entry '0' for key 1 In: /****/****/****/****/httpdocs/admin/modules/ranks.php on line: 144

The issue is that he is attempting to run an sql command for inserting a new rank and the fields are not matching.

PHP:
INSERT INTO `cms_bbranks` VALUES (1, 'Moderator', -1, 0, 1, 'images/ranks/stars-3.png');
run this on your database query (phpmyadmin or equivilent) and see if the error goes away.


djdevon3's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.33/4.4/4.3.11
Back to top
View user's profile Visit poster's website Photo Gallery
dcollis
Heavy poster
Heavy poster

Offline Offline
Joined: Mar 18, 2005
Posts: 230

PostPosted: Wed Jul 19, 2006 11:48 pm
Post subject: Re: a database error has occurred

Theres nothing wrong with the sql.
You don't need to include an ID at the start of an insert if auto_increment is set. Which from his image it shows it isn't. As i said, i imagine its got something to do with him migrating hosts and not exporting from one database to another while maintaining auto_increment on ids.

My guess is that all tables will have this problem. Not just this one. And that any inserts will fail until he goes through each table and sets auto_increment to be on for each primary key/id field.

But its think the real problem here is that the questions and answers are being lost in translation Sad


dcollis's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux//4.0.27/4.4.2/9.0.6.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  FAQ (Frequently Answered Questions)
Page 2 of 2
All times are GMT
Go to page Previous  1, 2

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy