Migration from 2.5 to 3 - how to last step?
Posted: 22 Jun 2015, 16:44
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
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