Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

uniquely identifying players

Status
Not open for further replies.

phunkyb

Technical User
Dec 30, 2003
14
0
0
AU
Hello
i am making a football player database and was wondering what the best way to uniquely identify each player. I was thinking the first three letters of the surname and first two of first name but there is always the chance of two players being the same. Is the only way to use numbers because it would be time consuming trying to get the right number when inserting data
Thanks
Ben
 
Hi,

If you want UNIQUE values, you have to rely on an auto-incremented value.

You could use social security number, but I dont think that's allowed to store without special permission. At least that is how it is in Norway.

Here, we have to apply, before we can use such information.

I think the easiest is to meerly make an autonumber field and use that for identification.

It's not more work when inserting data, as you always have to choose to whom you want to insert data.

eg. "select player to edit".

when you then are at that page, you already have his/her id and can use that to insert. (INSERT ... WHERE ID = '{$_POST['id']}'...)

remember to use functions like trim(), strip_tags(), nl2br(), etc. if required!

look them up on (IF you are running php, that is!)
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top