SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Mysql
-
May 30, 2003, 02:21 #1
- Join Date
- May 2003
- Location
- Norway
- Posts
- 47
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mysql
How can I change the value of a post in my sql.
I want to change ID=1 to ID=2(over 100 posts in the table)
Is there an easy way to do this?
-
May 30, 2003, 02:35 #2
- Join Date
- Mar 2002
- Location
- Osnabrück
- Posts
- 1,003
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi.
Do you want always increase the id value by one?
If so try:
Code:UPDATE yourtable SET id = id + 1;
-
May 30, 2003, 02:37 #3
- Join Date
- May 2003
- Location
- Norway
- Posts
- 47
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What i really want is to find a way to insert the same posts with a new ID,to save time.
I need to insert the same posts with a new ID about 10 or 11 times..
-
May 30, 2003, 02:40 #4
- Join Date
- Mar 2002
- Location
- Osnabrück
- Posts
- 1,003
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You could use an auto_increment field for the id. This would create a new id for each entry.
-
May 30, 2003, 02:46 #5
- Join Date
- May 2003
- Location
- Norway
- Posts
- 47
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hmm....i'll try..but i'm not sure excactly how
-
May 30, 2003, 02:48 #6
- Join Date
- May 2003
- Location
- Norway
- Posts
- 47
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have ca. 100 posts that have ID=1,and I need the same posts with ID=2,3,4..and so on..
Bookmarks