Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Update an SQL table


Message #1 by "Brad" <insuran@m...> on Fri, 26 May 2000 2:4:2
I am creating website where people can store thier golf scores and calulate 

thier handicap. They are allowed to store up to 5 golf scores, so when a 

user shoots thier 6th round of golf they are going to want to update there 

infomation. I am not quite sure how to get this to work propertly using the 

update SQL command...



The table's name is Handicap and the column names are

Username, password, course1, cr1, sr1, score1, and so on...



I want to update a users record with a new set of scores, the course he 

golfed at (course1), the course's USGA rating (cr1), and the course USGA 

slope (sr1), and the score the user shot (score1).



Can anyone help me?

Message #2 by "Ken Schaefer" <ken.s@a...> on Fri, 26 May 2000 21:33:19 +1000
With your current database design, perhaps add an extra field which can have

the values 1

through 5, and which corresponds to the "slot" that is next to be updated.



So for a new user the value would be 1, and info gets put into the first

four fields, and the counter is updated to 2, and so on until the counter

reaches 5, and then you set it back to 1.



HTH



Cheers

Ken



----- Original Message -----

From: "Brad" 

To: "ASP Databases" <asp_databases@p...>

Sent: Friday, May 26, 2000 12:00 AM

Subject: [asp_databases] Update an SQL table





> I am creating website where people can store thier golf scores and

calulate

> thier handicap. They are allowed to store up to 5 golf scores, so when a

> user shoots thier 6th round of golf they are going to want to update there

> infomation. I am not quite sure how to get this to work propertly using

the

> update SQL command...

>

> The table's name is Handicap and the column names are

> Username, password, course1, cr1, sr1, score1, and so on...

>

> I want to update a users record with a new set of scores, the course he

> golfed at (course1), the course's USGA rating (cr1), and the course USGA

> slope (sr1), and the score the user shot (score1).

>

> Can anyone help me?

>

  Return to Index