Migration from 2.5 to 3 - how to last step?

Phoca Guestbook - creating guestbooks in Joomla! CMS
adpc
Phoca Member
Phoca Member
Posts: 10
Joined: 22 Jun 2015, 16:39

Migration from 2.5 to 3 - how to last step?

Post 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:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
adpc
Phoca Member
Phoca Member
Posts: 10
Joined: 22 Jun 2015, 16:39

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

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply