PDA

View Full Version : smf database restore


tedgraves
04-04-2007, 02:35 AM
im uploading my .sql database to get these errors,

Error
SQL query:

# ================================================== ========
#
# Database dump of tables in `tedgraves`
# April 03, 2007, 11:03:06 AM
#
# ================================================== ========
#
# Dumping data in `smf_ads`
#
INSERT INTO `smf_ads` (
`ADS_ID` ,
`NAME` ,
`CONTENT` ,
`BOARDS` ,
`POSTS` ,
`HITS` ,
`TYPE` ,
`show_index` ,
`show_board` ,
`show_threadindex` ,
`show_thread` ,
`show_bottom` ,
`show_welcome` ,
`show_topofpage` ,
`show_towerright` ,
`show_towerleft`
)
VALUES ( 1, 'Help Support ROV', '<script type=\\\"text/javascript\\\"><!--\r\ngoogle_ad_client = \\\"pub-1076476827907275\\\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\ngoogle_ad_format = \\\"728x90_as\\\";\r\ngoogle_ad_type = \\\"text\\\";\r\n//2006-11-18: guns n\\\' roses\r\ngoogle_ad_channel = \\\"0239635001\\\";\r\n//--></script>\r\n<script type=\\\"text/javascript\\\"\r\n src=\\\"http://pagead2.googlesyndication.com/pagead/show_ads.js\\\">\r\n</script>', '', '', 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 ) ;


MySQL said:

#1062 - Duplicate entry '1' for key 1

Josh
04-04-2007, 09:48 AM
I'm not a SQL person but I did a google search & these had a similar problem:
#1062 - Duplicate entry '1' for key 1
http://www.webdeveloper.com/forum/showthread.php?t=70168

Duplicate data, have you imported it already or something?

Laibcoms
04-05-2007, 10:16 PM
Hi,

The best way is by always checking "DROP TABLES WHEN EXIST" when you are making backups or exports. It is mainly to avoid error #1062. Josh is correct, there is already an entry for number '1'. You will have to either empty that specific table or remove that entry '1' from your sql dump.

Hope that helps. ^_^

Regards