Gossamer Forum
Home : General : Perl Programming :

Shifting entries in a perl database

Quote Reply
Shifting entries in a perl database
Hello, I'm using DBMan for a database and it works great. I have a problem here that is not really related to DBMan though. I am modifying it for a different purpose. What I want to do is set up a system where each entry has two fields, a Name and a number. What I want to be able to do is best explained in an example. Here are the entries, listed by name and by number:
Joe, 1
Fred, 2
Bob, 3
Norm, 4
Louis, 5
Now, what I want to do is be able to take Norm (who is in 4) and move him to the second position, have fred move to the 3rd, bob to the fourth. This would have to keep going until it reached the number that Norm was previously located in. (in this case, 4). I do not want any two people to have the same number, so I want to end up with 1,2,3,4,5 as the numbers for people in the database.

This is maybe a bit confusing, but I can't think of how I could explain it better... Please tell me if and how it can be done!

Thanks,
Jason R.
Subject Author Views Date
Thread Shifting entries in a perl database Jagerman 4385 Nov 3, 1998, 10:09 AM
Post Re: Shifting entries in a perl database
Alex 4247 Nov 3, 1998, 11:47 AM
Post Re: Shifting entries in a perl database
Jagerman 4219 Nov 4, 1998, 8:38 AM
Post Re: Shifting entries in a perl database
Alex 4238 Nov 4, 1998, 11:22 AM