-
Alter table?
I have a mysql DB for me forum and a couple of people seem to have become deleted .
I have backups of the members table and can insert that no problem.
The problem is with posts, basically they are associated with their poster by a member id column thingy. When a user is deleted the member id coloumn is set to -1.
The table is called members, the column with the member ID is called ID_MEMBER and the column with the members name is called posterName
So I'm wanting to change value of ID_MEMBER column to 604 from -1 where the value of posterName is bob
I'v looked on the mysql site but cant work out what query I need though :(
Any ideas?
Cheers
-
Code:
UPDATE members SET id_member = 604 WHERE postername = 'BOB';
That should do the trick for you. Of course, replace proper names and values where appropriate.
-
Ta, will give it a go in a sec
-
That did the trick nicely.
Appreciate it
Cheers
Ben
-