![Sad :-(](./images/smilies/icon_sad.gif)
Jan
Code: Select all
CREATE TABLE migrate AS
SELECT id,
@rowid:=@rowid+2 AS rowid,
@rowid - 1 AS lftnew,
@rowid AS rgtnew FROM jos_phocaguestbook_items,
(SELECT @rowid:=0) AS init
ORDER BY id;
UPDATE jos_phocaguestbook_items SET lft=(SELECT lftnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);
UPDATE jos_phocaguestbook_items SET rgt=(SELECT rgtnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);
Hello Jan,Jan wrote: ↑23 Feb 2017, 02:09 Hi, the problem is, there are many different parts (like server or database settings) which can somehow influence this, so it is really hard to say what can be wrong there. I tested this on 3 different servers without any such problem. The guide was based on user's experiences (in was made over time by different users, so there were experiences on different server by different users - tested and working after all the sql queries). So really hard to say if there is something specific on server or if there was something specific when migrating, orreally hard to say.
This SQL should solve problems with ordering:
What are the values in menu link to guestbook:Code: Select all
CREATE TABLE migrate AS SELECT id, @rowid:=@rowid+2 AS rowid, @rowid - 1 AS lftnew, @rowid AS rgtnew FROM jos_phocaguestbook_items, (SELECT @rowid:=0) AS init ORDER BY id; UPDATE jos_phocaguestbook_items SET lft=(SELECT lftnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id); UPDATE jos_phocaguestbook_items SET rgt=(SELECT rgtnew FROM migrate WHERE migrate.id = jos_phocaguestbook_items.id);
- Order by
- Order direction
- Order direction
for comments
When changing them, does anything change on the site?
Hello Jan,
Jan,