penguinspeaks
Technical User
I am trying to automate an order based on my input.
If I enter a 5, for example, I want the rest of the records to auto-update. So the next record to meet the criteria would be
6, the next 7, and so on.
This is not updating anything after the record that is being updated from my form.
This isn't a public site so I am not concerned with injection.
Thanks,
Penguin
Please keep in mind that I am using classic ASP with MySQL database. Not sure if that information helps or not.
If I enter a 5, for example, I want the rest of the records to auto-update. So the next record to meet the criteria would be
6, the next 7, and so on.
Code:
SET INFO1 = CONN.EXECUTE("SELECT * FROM SONGS1 WHERE ID ="&VARID&"")
VARNO = INFO1("setlist_order")
varorder is the number entered on my form. I want the records that follow to be updated.
I = VARORDER +1
DO UNTIL INFO1.EOF
SQL = "UPDATE SONGS1 SET setlist_order = "&I&" where CURRENT_SET = 1" ---- This is where I want to start with the record following the one that 2was updated.
CONN.EXECUTE (SQL)
I = I + 1
INFO1.MOVENEXT
LOOP
This isn't a public site so I am not concerned with injection.
Thanks,
Penguin
Please keep in mind that I am using classic ASP with MySQL database. Not sure if that information helps or not.