| | |
Update Scoreboard - ASP
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hello,
I am facing a problem in ASP. The scenario is...
I have a database with the following Colums and the data type of all Colums are integer
id|score1 | score2 | score3
------------------------------------
1 | 10 | 4 | 10 |
2 | 5 | 51 | 10 |
3 | 5 | 22 | 10 |
4 | 15 | 54 | 10 |
5 | 7 | 11 | 10 |
6 | 19 | 2 | 10 |
7 | 10 | 1 | 10 |
8 | 12 | 66 | 10 |
9 | 3 | 75 | 10 |
10| 7 | 11 | 10 |
Now, I have a page (search_result.asp) where I can search for scores based on the ids, and each result has a corresponding checkbox (so that I can increase the number of score of a particular ID or multiple IDs )
I have a second page (update_scrore.asp) where I have 3 textboxes where I can enter scores and at the click of a button these scores are added to the selected ID.
I can make it work perfectly fine when It comes to just one score update at a time. But I cannot figure out how to add the score if I am selecting multiple checkboxes i.e. multiple IDs.
For Eg. If I am selecting the checkbox containing the ID 8, and I want to add 30 scores in each 3 colums, the updated value will be 42 | 96 | 40
But I cannot figure out, how should I add and update the colums If I am selecting multiple IDs i.e. 7, 5, 9
I am new to ASP, so please help.
Thanx in Advance....
God Bless
I am facing a problem in ASP. The scenario is...
I have a database with the following Colums and the data type of all Colums are integer
id|score1 | score2 | score3
------------------------------------
1 | 10 | 4 | 10 |
2 | 5 | 51 | 10 |
3 | 5 | 22 | 10 |
4 | 15 | 54 | 10 |
5 | 7 | 11 | 10 |
6 | 19 | 2 | 10 |
7 | 10 | 1 | 10 |
8 | 12 | 66 | 10 |
9 | 3 | 75 | 10 |
10| 7 | 11 | 10 |
Now, I have a page (search_result.asp) where I can search for scores based on the ids, and each result has a corresponding checkbox (so that I can increase the number of score of a particular ID or multiple IDs )
I have a second page (update_scrore.asp) where I have 3 textboxes where I can enter scores and at the click of a button these scores are added to the selected ID.
I can make it work perfectly fine when It comes to just one score update at a time. But I cannot figure out how to add the score if I am selecting multiple checkboxes i.e. multiple IDs.
For Eg. If I am selecting the checkbox containing the ID 8, and I want to add 30 scores in each 3 colums, the updated value will be 42 | 96 | 40
But I cannot figure out, how should I add and update the colums If I am selecting multiple IDs i.e. 7, 5, 9
I am new to ASP, so please help.
Thanx in Advance....
God Bless
Last edited by cancer10; Oct 24th, 2006 at 8:55 am.
•
•
Join Date: Jul 2005
Posts: 483
Reputation:
Solved Threads: 19
ASP Syntax (Toggle Plain Text)
update TABLENAME set score1 = score1+30, score2=score2+30, score3 =score3+30 where id in (7,5,9)
![]() |
Similar Threads
- Problem when adding delete confirmation (ASP)
- Tooltip for ASP database query result (ASP)
- hi everybody (ASP)
- AJAX techniques... (JavaScript / DHTML / AJAX)
- Atlas - Ajax (ASP.NET)
- SQLCommandBuilder is Dumb? (C#)
- ASP.Net VB Page to update a users profile not updating. (MS SQL)
- access UPDATE problems (MS Access and FileMaker Pro)
Other Threads in the ASP Forum
- Previous Thread: Update Multiple Records
- Next Thread: Microsoft JET Database Engine error '80040e14'
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





