SMF Support > phpBB

'ORDER BY null' at line 203

<< < (3/4) > >>

TE:
Which MySQL version is that server? MySQL seems to have an issue with SMF's database layer (ORDER BY NULL will automatically be added if there's no ORDER defined).

A workaround (for the conversion process) would be to add ORDER to the related section in phpbb3_to_smf.sql
find

--- Code: (find) ---p.post_text AS body
--- End code ---
replace with

--- Code: (replace) ---p.post_text AS body
ORDER BY p.post_id
--- End code ---

rollntider:

--- Quote from: Thorsten Eurich on August 22, 2012, 12:59:41 AM ---Which MySQL version is that server? MySQL seems to have an issue with SMF's database layer (ORDER BY NULL will automatically be added if there's no ORDER defined).

A workaround (for the conversion process) would be to add ORDER to the related section in phpbb3_to_smf.sql
find

--- Code: (find) ---p.post_text AS body
--- End code ---
replace with

--- Code: (replace) ---p.post_text AS body
ORDER BY p.post_id
--- End code ---

--- End quote ---



thanks

Converting posts...

Unsuccessful!
This query:
SELECT
p.post_id AS id_msg, p.topic_id AS id_topic, p.forum_id AS id_board,
p.post_time AS poster_time, p.poster_id AS id_member, p.post_subject AS subject,
IFNULL(m.username, 'Guest') AS poster_name,
IFNULL(m.user_email, 'Unknown') AS poster_email,
IFNULL(p.poster_ip, '0.0.0.0') AS poster_ip,
p.enable_smilies AS smileys_enabled, p.post_edit_time AS modified_time,
CASE p.post_edit_user WHEN 0 THEN 'Guest' ELSE m2.username END AS modified_name,
p.post_text AS body
ORDER BY p.post_id
FROM `blindsideblitz`.phpbb_posts AS p
LEFT JOIN `blindsideblitz`.phpbb_users AS m ON (m.user_id = p.poster_id)
LEFT JOIN `blindsideblitz`.phpbb_users AS m2 ON (m2.user_id = p.post_edit_user)
LIMIT 0, 200;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `blindsideblitz`.phpbb_posts AS p
LEFT JOIN `blindsideblitz`.phpbb_users A' at line 11

thats the error now

TE:
sorry, my mistake.. IIRC ORDER BY needs to be at the end of a sql statement:
instead of my above suggestion:
find:

--- Code: (find) ---LEFT JOIN {$from_prefix}users AS m2 ON (m2.user_id = p.post_edit_user);
--- End code ---
replace with:

--- Code: (replace) ---LEFT JOIN {$from_prefix}users AS m2 ON (m2.user_id = p.post_edit_user)
ORDER BY p.post_id;
--- End code ---

rollntider:

--- Quote from: Thorsten Eurich on August 22, 2012, 03:04:58 AM ---sorry, my mistake.. IIRC ORDER BY needs to be at the end of a sql statement:
instead of my above suggestion:
find:

--- Code: (find) ---LEFT JOIN {$from_prefix}users AS m2 ON (m2.user_id = p.post_edit_user);
--- End code ---
replace with:

--- Code: (replace) ---LEFT JOIN {$from_prefix}users AS m2 ON (m2.user_id = p.post_edit_user)
ORDER BY p.post_id;
--- End code ---

--- End quote ---

thanks i will try it in a bit

rollntider:
Converting posts...You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY null' at line 203

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version