| Author |
Topic Search Topic Options
|
PhGp
Newbie
Joined: 10 May 2005
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Topic: Importing Members from Snitz forum Posted: 18 May 2005 at 2:44pm |
|
I have a long standing member base using Snitz forum. I have managed to
migrate them over to WWF, with only one problem. WWF has preset Author
ID of "Guest" ID=2. Of course my Snitz forum ID=2 member is my oldest
member, with the most posts, and is the assistant Admin. This can not
be a unique problem since WWF is far more flexible than most Forums out
there. Can I (thru search and replace) find all reference to Guest ID=2
and change to a different number, so I can use my Assistant Admin and
all their exisiting posts? I am not trying to eliminate Guest just
change the number.
|
 |
sfd19
Senior Member
Joined: 20 December 2004
Status: Offline
Points: 263
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 3:28am |
|
Why don't you simply assign another ID (X) to your assistant admin and
run a SQL query that changes all database references from ID=2 to ID=X ?
Edited by sfd19 - 19 May 2005 at 5:37am
|
|
|
 |
PhGp
Newbie
Joined: 10 May 2005
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 8:44am |
|
Thanks for your quick reply sfd19,
Unfortunately, I don't know how to code SQL query to do that, but I
think I can accomplish same through mass "Find and Replace". However if
I understand your suggestion, wouldn't your query bring "Guest along
with it, as Guest has ID=2 as well as assistant admin? The code that
affects ID=2 is extensive. Not only ID=2, but ID <2> as an
example. I obviously need help or at least understanding of all the
variations. BTW, I understand my way (Find and Replace) is labor
intensive, but have no choice unless someone has suggestion.
|
 |
sfd19
Senior Member
Joined: 20 December 2004
Status: Offline
Points: 263
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 10:08am |
|
Best, download the database, make a backup, and then create a new member and notice the Author_ID, e.g. 100
Now run an update query against the local database to change all
message entries from Author_ID=2 (your assistant admin's ID) to
Author_ID=100:
UPDATE tblThread set Author_ID=100 WHERE Author_ID=2
Apply similar update queries against all the tables that have the
Author_ID included, e.g. tblPoll, tblAuthor, tblTopic,
tblPMMessage,...,...
Make sure that you also take care of other ID's, like the From_ID in tblPMMessage!
When you have applied all changes then make the proper changes to the profiles of ID=2 (now the 'guest') and ID=100 (now AA)
Re-upload the DB and test it.
Edited by sfd19 - 19 May 2005 at 1:20pm
|
|
|
 |
PhGp
Newbie
Joined: 10 May 2005
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 6:29pm |
Thanks again sfd19,
I think you have the answer... however, I need help in the construction
of query ... tried several times ... keep getting syntax error. You
said "Now run an update query against the local database to
change all
message entries from Author_ID=2 (your assistant admin's ID) to
Author_ID=100:" If you could help with construction of this query, I
will then extrapulate to other tables.
Really feeling like a dummy.
|
 |
sfd19
Senior Member
Joined: 20 December 2004
Status: Offline
Points: 263
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 6:52pm |
|
It is the query I posted above:
UPDATE tblThread set Author_ID=100 WHERE Author_ID=2
Remind you that you have to use similar queries for all tables where the Author_ID gets used.
|
|
|
 |
PhGp
Newbie
Joined: 10 May 2005
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2005 at 8:04pm |
|
sfd19,
I have: UPDATE tblAuthor set Author_ID=39 WHERE Author_ID=2 in the
Update to: row.... keeps throwing syntax error "you may have entered an
operand without an operator"
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2005 at 1:29am |
|
Nothing wrong with that SQL statement... Where exactly are you entering it?
|
 |