PDA

View Full Version : Help Please! A couple of stupid questions.


HailToTheTheif
08-06-2004, 01:04 AM
Hey guys I really need your help.

Okay well, I'm using phpMyAdmin (version 2.5.6 if it matters) and what I want to do is change all of the values in a table so that they are up one number.

What I mean is that say in a table called thing_allposts I want to change all the user_ids so that they are +1. (for example in each row the user_id 1 will be changed to 2 and the user_id 2 will be changed to 3 and so on) and I want to know if this is possible, and if so how.

If that's not possible, is there some command I can do to globably replace all of the values from one value to another?

Thanks for your time and try to be as specific as possible as I am a dumb newbie :p.

Since in my newbish ways of trying to explain it I have lost all of you, I hope attaching this image will help tell you what I'm trying to do.

http://img34.exs.cx/img34/6682/do-you-understand-yet.gif

Sorry if this is in the wrong forums.

sad69
08-06-2004, 01:42 AM
I think this query should do what you're trying:

update thing_allposts set poster_id=poster_id+1;


Sadiq.