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:
anyone know how to restart dbserver on NT automatically (1999)
Heads up, cookies *may* be outlawed in Europe (2001)
Quit revisited (1997)
WebCatalog 2.0 b 15 mac (1997)
Am I going senile? (Price recalc based on quantity) (1997)
Re:Emailer and encryption (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998)
Cookies and webcat (1997)
[WebDNA] WebDNA 7 multiple fcgid processes (2012)
[include] affect on filepaths for links? (1997)
Text vs. Math (2000)
Not really WebCat (1997)
Multiple email troubles (Followup) (2001)
[WriteFile] problems (1997)
[showif] not working (2003)
WebCatalog for guestbook ? (1997)
[OT] - Credit card processing company fees (2004)
How do you hide [math]stuff[/math] (1997)
UPDATE PROBLEM (1997)