Page 1 of 1

Migration from 2.5 to 3 - how to last step?

Posted: 22 Jun 2015, 16:44
by adpc
Hi,

Just used the manual https://www.phoca.cz/phocagallery/50-joo ... o-joomla-3
to migrate phoca guestbook to Joomla 3. Worked well, messages are back, but they are ordered from old to latest, and not from latest to old.
I think it is because I couldn't do this step in the manual for ordering, I only replaced the jos prefix to mine, what am I doing wrong?
CREATE TABLE migrate AS
2.SELECT id,
3. @rowid:=@rowid+2 AS rowid,
4. @rowid - 1 AS lftnew,
5. @rowid AS rgtnew FROM jos_phocaguestbook_items,
6. (SELECT @rowid:=0) AS init
7.ORDER BY id;
8.
9.UPDATE jos_phocaguestbook_items SET lft=(SELECT lftnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);
10.UPDATE jos_phocaguestbook_items SET rgt=(SELECT rgtnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);

This is the error:
Error

SQL query: Documentation

CREATE TABLE migrate AS 2.SELECTid,
3.@rowid := @rowid +2 AS rowid,
4.@rowid -1 AS lftnew,
5.@rowid AS rgtnew FROM uz0i2_phocaguestbook_items,
6.(

SELECT @rowid :=0
) AS init7.ORDER
BY id;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2.SELECT id,
3. @rowid:=@rowid+2 AS rowid,
4. @rowid - 1 AS lftnew,
5. @rowi' at line 2


Thanks :wink:

Re: Migration from 2.5 to 3 - how to last step?

Posted: 22 Jun 2015, 19:13
by Jan
Hi, hmmm, are you able to test it in mysql - mostly such sql queries are done for mysql - not sure if mariadb is different to mysql in this case :idea:

Anyway, the error includes the line numbers, did you copy them too? (The should be removed)

Jan

Re: Migration from 2.5 to 3 - how to last step?

Posted: 22 Jun 2015, 20:18
by adpc
Hi Jan,

Thanks a lot for your reply.. Indeed, while copying the text field in the manual, I copied the numbers :oops:
Did it now without the numbers, and yes ofcourse, my messages are now sorted perfectly.
Thanks again, so happy that the migration works perfect now :D :D
Have a nice day

Best regards,
Cedric

Re: Migration from 2.5 to 3 - how to last step?

Posted: 25 Jun 2015, 22:36
by Jan
Ok