help with renumbering sequence in mySQL db
Posted: Sun Jul 02, 2006 9:32 pm
Hello,
I'm attempting to add a standard sequence (increments of 1) for all records meeting a given criteria. My SQL select statement would look something like this:
There may be dozens of records that meet it's given criteria. So --- for every record found, UPDATE the first record with a sequence of 1, next record with a sequence of 2, etc. until the recordset is finished.
Any ideas are extremely appreciated. Thank you!!
I'm attempting to add a standard sequence (increments of 1) for all records meeting a given criteria. My SQL select statement would look something like this:
Code: Select all
mysql_query("SELECT * FROM myTable WHERE city='Tampa' ORDER BY recordSequence ASC")Any ideas are extremely appreciated. Thank you!!