convert.php
ikrijg ik het volgende:
Code (php)
1
2
2
INSERT INTO `test`.smf_topics
(ID_TOPIC, isSticky, ID_FIRST_MSG, ID_LAST_MSG, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_BOARD, ID_POLL, locked, numReplies, numViews)
(ID_TOPIC, isSticky, ID_FIRST_MSG, ID_LAST_MSG, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_BOARD, ID_POLL, locked, numReplies, numViews)
Caused the error:
Duplicate entry '5353-12' for key 3
Duplicate entry '86206' for key 1
het probleem is nu gewoon, bij wat moet ik die Duplicate entry vinden in de phpBB dbase?
ik geraak er niet uit, ik heb al alle combinaties uitgeprobeerd, maar lukt me dus niet
het sql script is:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- Converting topics...
/******************************************************************************/
TRUNCATE {$to_prefix}topics;
TRUNCATE {$to_prefix}log_topics;
TRUNCATE {$to_prefix}log_boards;
TRUNCATE {$to_prefix}log_mark_read;
---* {$to_prefix}topics
SELECT
t.topic_id AS ID_TOPIC, t.topic_type = 1 AS isSticky,
t.topic_first_post_id AS ID_FIRST_MSG, t.topic_last_post_id AS ID_LAST_MSG,
t.topic_poster AS ID_MEMBER_STARTED, p.poster_id AS ID_MEMBER_UPDATED,
t.forum_id AS ID_BOARD, v.vote_id AS ID_POLL, t.topic_status = 1 AS locked,
t.topic_replies AS numReplies, t.topic_views AS numViews
FROM {$from_prefix}topics AS t
LEFT JOIN {$from_prefix}posts AS p ON (p.post_id = t.topic_last_post_id)
LEFT JOIN {$from_prefix}vote_desc AS v ON (v.topic_id = t.topic_id)
/* // !!! WHERE t.topic_moved_id = 0 */
GROUP BY t.topic_id
HAVING ID_FIRST_MSG != 0
AND ID_LAST_MSG != 0;
---*
/******************************************************************************/
--- Converting posts (this may take some time)...
/******************************************************************************/
TRUNCATE {$to_prefix}messages;
---* {$to_prefix}messages 200
---{
$row['body'] = preg_replace('~\[size=([789]|[012]\d)\]~is', '[size=$1px]', $row['body']);
---}
SELECT
p.post_id AS ID_MSG, p.topic_id AS ID_TOPIC, p.post_time AS posterTime,
p.poster_id AS ID_MEMBER,
SUBSTRING(IFNULL(u.user_email, ''), 1, 255) AS posterEmail,
SUBSTRING(IF(IFNULL(pt.post_subject, '') = '', t.topic_title, pt.post_subject), 1, 255) AS subject,
SUBSTRING(IF(IFNULL(p.post_username, '') = '', u.username, p.post_username), 1, 255) AS posterName,
p.enable_smilies AS smileysEnabled, p.post_edit_time AS modifiedTime,
CONCAT_WS('.', CONV(SUBSTRING(p.poster_ip, 1, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 3, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 5, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 7, 2), 16, 10)) AS posterIP,
SUBSTRING(REPLACE(REPLACE(IF(pt.bbcode_uid = '', pt.post_text, REPLACE(REPLACE(REPLACE(pt.post_text, CONCAT(':u:', pt.bbcode_uid), ''), CONCAT(':1:', pt.bbcode_uid), ''), CONCAT(':', pt.bbcode_uid), '')), '\n', '<br />'), '"', '"'), 1, 65534) AS body,
p.forum_id AS ID_BOARD, '' AS modifiedName, 'xx' AS icon
FROM ({$from_prefix}posts AS p, {$from_prefix}posts_text AS pt, {$from_prefix}topics AS t)
LEFT JOIN {$from_prefix}users AS u ON (u.user_id = p.poster_id)
WHERE pt.post_id = p.post_id
AND t.topic_id = p.topic_id;
---*
/******************************************************************************/
TRUNCATE {$to_prefix}topics;
TRUNCATE {$to_prefix}log_topics;
TRUNCATE {$to_prefix}log_boards;
TRUNCATE {$to_prefix}log_mark_read;
---* {$to_prefix}topics
SELECT
t.topic_id AS ID_TOPIC, t.topic_type = 1 AS isSticky,
t.topic_first_post_id AS ID_FIRST_MSG, t.topic_last_post_id AS ID_LAST_MSG,
t.topic_poster AS ID_MEMBER_STARTED, p.poster_id AS ID_MEMBER_UPDATED,
t.forum_id AS ID_BOARD, v.vote_id AS ID_POLL, t.topic_status = 1 AS locked,
t.topic_replies AS numReplies, t.topic_views AS numViews
FROM {$from_prefix}topics AS t
LEFT JOIN {$from_prefix}posts AS p ON (p.post_id = t.topic_last_post_id)
LEFT JOIN {$from_prefix}vote_desc AS v ON (v.topic_id = t.topic_id)
/* // !!! WHERE t.topic_moved_id = 0 */
GROUP BY t.topic_id
HAVING ID_FIRST_MSG != 0
AND ID_LAST_MSG != 0;
---*
/******************************************************************************/
--- Converting posts (this may take some time)...
/******************************************************************************/
TRUNCATE {$to_prefix}messages;
---* {$to_prefix}messages 200
---{
$row['body'] = preg_replace('~\[size=([789]|[012]\d)\]~is', '[size=$1px]', $row['body']);
---}
SELECT
p.post_id AS ID_MSG, p.topic_id AS ID_TOPIC, p.post_time AS posterTime,
p.poster_id AS ID_MEMBER,
SUBSTRING(IFNULL(u.user_email, ''), 1, 255) AS posterEmail,
SUBSTRING(IF(IFNULL(pt.post_subject, '') = '', t.topic_title, pt.post_subject), 1, 255) AS subject,
SUBSTRING(IF(IFNULL(p.post_username, '') = '', u.username, p.post_username), 1, 255) AS posterName,
p.enable_smilies AS smileysEnabled, p.post_edit_time AS modifiedTime,
CONCAT_WS('.', CONV(SUBSTRING(p.poster_ip, 1, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 3, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 5, 2), 16, 10), CONV(SUBSTRING(p.poster_ip, 7, 2), 16, 10)) AS posterIP,
SUBSTRING(REPLACE(REPLACE(IF(pt.bbcode_uid = '', pt.post_text, REPLACE(REPLACE(REPLACE(pt.post_text, CONCAT(':u:', pt.bbcode_uid), ''), CONCAT(':1:', pt.bbcode_uid), ''), CONCAT(':', pt.bbcode_uid), '')), '\n', '<br />'), '"', '"'), 1, 65534) AS body,
p.forum_id AS ID_BOARD, '' AS modifiedName, 'xx' AS icon
FROM ({$from_prefix}posts AS p, {$from_prefix}posts_text AS pt, {$from_prefix}topics AS t)
LEFT JOIN {$from_prefix}users AS u ON (u.user_id = p.poster_id)
WHERE pt.post_id = p.post_id
AND t.topic_id = p.topic_id;
---*
kunnen julie me helpen aub?
mijn dank zal groot zijn
Er zijn nog geen reacties op dit bericht.