SMF Support > Converting to SMF

Converting XMB to SMF

<< < (2/4) > >>

vbgamer45:
Try running another query before it such as
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Tom84:
you mean something like this ?

--- Converting topics...
/******************************************************************************/

TRUNCATE {$to_prefix}topics;
TRUNCATE {$to_prefix}log_topics;
TRUNCATE {$to_prefix}log_boards;
TRUNCATE {$to_prefix}log_mark_read;
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

---* {$to_prefix}topics
SELECT
   t.tid AS id_topic, t.topped AS is_sticky, t.fid AS id_board,
   IFNULL(uf.uid, 0) AS id_member_started, t.replies AS num_replies,
   t.views AS num_views,
   CASE WHEN t.closed = 'yes' THEN 1 ELSE 0 END AS locked, MIN(p.pid) AS id_first_msg,
   MAX(p.pid) AS id_last_msg, IF(t.pollopts != '', t.tid, 0) AS id_poll
FROM {$from_prefix}threads AS t
   INNER JOIN {$from_prefix}posts AS p ON (p.tid = t.tid)
   LEFT JOIN {$from_prefix}members AS uf ON (uf.username = t.author)
GROUP BY t.tid, is_sticky, id_board,  id_member_started, num_views, num_replies,  id_first_msg, id_last_msg, id_poll
HAVING id_first_msg != 0
   AND id_last_msg != 0;
---*

---* {$to_prefix}topics (update id_topic)
SELECT t.id_topic, uf.uid AS id_member_updated
FROM {$to_prefix}topics AS t
   INNER JOIN {$from_prefix}posts AS p ON (p.pid = t.id_last_msg)
   INNER JOIN {$from_prefix}members AS uf ON (uf.username = p.author);
---*




sorry for my ignorance, i just have a litle more knowledge than the average on this, but i'm not an expert :(

vbgamer45:
Yes exactly

Tom84:
i've tryed it, still same error :(


SELECT
t.tid AS id_topic, t.topped AS is_sticky, t.fid AS id_board,
IFNULL(uf.uid, 0) AS id_member_started, t.replies AS num_replies,
t.views AS num_views,
CASE WHEN t.closed = 'yes' THEN 1 ELSE 0 END AS locked, MIN(p.pid) AS id_first_msg,
MAX(p.pid) AS id_last_msg, IF(t.pollopts != '', t.tid, 0) AS id_poll
FROM `forocato_seN1zEt`.xmb_threads AS t
INNER JOIN `forocato_seN1zEt`.xmb_posts AS p ON (p.tid = t.tid)
LEFT JOIN `forocato_seN1zEt`.xmb_members AS uf ON (uf.username = t.author)
GROUP BY t.tid, is_sticky, id_board, id_member_started, num_views, num_replies, id_first_msg, id_last_msg, id_poll
HAVING id_first_msg != 0
AND id_last_msg != 0
LIMIT 0, 500;
Caused the error:
1056

vbgamer45:
Try
SET sql_mode='';
SET SESSION sql_mode = '';

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version