Re: Renumbering Database Records
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23686
interpreted = N
texte = >Hi,>> How can I renumber the records in a database? I have a database with a>field ID. I want to go throught the database, possibly sorting on some>other field, and number the records 1,2,3,4,... etc so I can have a>unique ID for each record. After that, for example, I can use this ID to>delete a record.The easiest way is to begin my using the sku=[cart] parameter in your append context when creating each and every new record, like this:[append db=some.db]sku=[cart]&field1=somevalue&etc...[/append]Then every record in your db will have a unique sku value, which means you can use either a [search] or a [lookup] later to retrieve the specific record you need. Or if your goal is to delete a specific record, you can use [delete db=some.db&eqskudata=something] to delete the record that has something in the sku field ... :)Sincerely,Ken GromeWebDNA Consultant
Associated Messages, from the most recent to the oldest:
>Hi,>> How can I renumber the records in a database? I have a database with a>field ID. I want to go throught the database, possibly sorting on some>other field, and number the records 1,2,3,4,... etc so I can have a>unique ID for each record. After that, for example, I can use this ID to>delete a record.The easiest way is to begin my using the sku=
[cart] parameter in your append context when creating each and every new record, like this:[append db=some.db]sku=
[cart]&field1=somevalue&etc...[/append]Then every record in your db will have a unique sku value, which means you can use either a
[search] or a
[lookup] later to retrieve the specific record you need. Or if your goal is to delete a specific record, you can use [delete db=some.db&eqskudata=something] to delete the record that has something in the sku field ... :)Sincerely,Ken GromeWebDNA Consultant
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
drop down selection list for a search (1998)
Displaying text and populating form fields (2005)
Using Applescript to process WebCatalog functions (1998)
Setting up shop (1997)
WebCat virtual postcard is done! Thanks for the help! (1998)
using showpage and showcart commands (1996)
[WebDNA] Has [middle] always worked this way? (2014)
Major Security Hole (1998)
Summary search -- speed (1997)
[WebDNA] reverse rank=off (2008)
[OT] Satellite (2005)
E-mail Attachments (1997)
Bad match! (2002)
Where is f2? (1997)
PSC recommends what date format yr 2000??? (1997)
redirect with frames (1997)
question: webdelivery folder and file (1997)
Testing the WebCat Email List Members (2000)
Occasional crashes with $remove (1997)
searchable list archive (1997)