I know this is not available in the Manage Boards area, although it'd be nice. I was wondering what the SQL query would be to move a bunch of boards together. They're childs of board 1 and I want them child of board 2.
UPDATE smf_boards
SET ID_PARENT = ###
WHERE ID_BOARD IN (xyz);
-[Unknown]
xyz? board id?
xyz is a list of the board IDs for the boards whose parent you want to change. It allows you to update this value for multiple boards with one query, instead of having to use "WHERE ID_BOARD = 'x' || ID_BOARD = 'y' || ID_BOARD = 'z'" or run a seperate query for each board.
"WHERE ID_BOARD = '1'"
It's true? xyz is board id?
Hmmm.. sorry to jump in here... but I want to move a board and its boards into a fresh forum.......
If I did something like a select on the above, would it be as straight forward as an update/insert into the other forum?
I realise I have to share the user DB....
:)
Lainaus käyttäjältä: Midgard - helmikuu 14, 2005, 10:09:57 AP
"WHERE ID_BOARD = '1'"
It's true? xyz is board id?
xyz is a list of the board IDs...
For instance - if you wanted to move boards 5,6 and 7 to board 1, you'd do it like this:
UPDATE smf_boards
SET ID_PARENT = '1'
WHERE ID_BOARD IN (5,6,7);Lainaus käyttäjältä: Tony - helmikuu 14, 2005, 10:10:15 AP
Hmmm.. sorry to jump in here... but I want to move a board and its boards into a fresh forum.......
If I did something like a select on the above, would it be as straight forward as an update/insert into the other forum?
I realise I have to share the user DB....
:)
INSERT INTO db2.smf_boards
SELECT * FROM db1.smf_boards;
Thank you Oldiesmann! :)
I take it that '*' is the id of the board ... and I can do the same with the sub boards :)
* means select everything. I wasn't thinking about moving just some boards. Do it like this (same principle as above for the "WHERE" clause).
INSERT INTO db1.smf_boards
SELECT * FROM db2.smf_boards
WHERE ID_BOARD IN (xyz);
Hey thats great - thanks for your help with this :)
No problem.
Thank you [Unknown] and Oldiesmann. :)
Thank you so much Oldiesmann