944,103 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1743
  • ASP RSS
Oct 24th, 2006
0

Update Scoreboard - ASP

Expand Post »
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
Last edited by cancer10; Oct 24th, 2006 at 8:55 am.
Similar Threads
Reputation Points: 58
Solved Threads: 1
Posting Whiz in Training
cancer10 is offline Offline
234 posts
since Dec 2004
Oct 25th, 2006
0

Re: Update Scoreboard - ASP

ASP Syntax (Toggle Plain Text)
  1. update TABLENAME set
  2. score1 = score1+30,
  3. score2=score2+30,
  4. score3 =score3+30
  5. where id in (7,5,9)
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Update Multiple Records
Next Thread in ASP Forum Timeline: Microsoft JET Database Engine error '80040e14'





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC