MyBB Community Forums

Full Version: Sql error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When i try to run an SQL Command i keep getting this error
Error

SQL query:

INSERT INTO `mybb_themestylesheets` (`sid`, `name`, `tid`, `attachedto`, `stylesheet`, `cachefile`, `lastmodified`) VALUES (1, 'global.css', 1, '', 'body {\r\n background: #efefef;\r\n color: #000;\r\n font-family: Verdana, Arial, Sans-Serif;\r\n font-size: 13px;\r\n text-align: center; /* IE 5 fix */\r\n line-height: 1.4;\r\n}\r\n\r\na:link {\r\n color: #026CB1;\r\n text-decoration: none;\r\n}\r\n\r\na:visited {\r\n color: #026CB1;\r\n text-decoration: none;\r\n}\r\n\r\na:hover, a:active {\r\n color: #000;\r\n text-decoration: underline;\r\n}\r\n\r\n#container {\r\n width: 95%;\r\n background: #fff;\r\n border: 1px solid #e4e4e4;\r\n color: #000000;\r\n margin: auto auto;\r\n padding: 20px;\r\n text-align: left; /* IE 5 fix */\r\n}\r\n\r\n#content {\r\n /* FIX: Make internet explorer wrap correctly */\r\n width: auto !important;\r\n\r\n}\r\n\r\n.menu ul {\r\n color: #000000;\r\n font-weight: bold;\r\n text-align: right;\r\n padding: 4px;\r\n}\r\n\r\n.menu ul a:link {\r\n co[...]

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 1 
It looks like there is already a mybb_themestylesheets entry with an sid of 1. If you are looking to overwrite it you could use the UPDATE or REPLACE INTO mysql commands. What exactly are you trying to do?
Removing the duplicate entry should do the trick.