I’m new to mysql and wanted to consult about using mysql for my mini game. The idea is that from a game i get two variables – one is email, and another is score.
I’m thinking of creating a table with two columns and setting email as the primary.
The question is how do I make php script replace score value for a player which tries for the second time?
For example user@user.com scores 100 in the first try, script adds that as INSERT INTO table VALUES ($email,$score); then user tries another time, same script tries to add but gets duplicate error. Any help on script logic would be great! cheers
This requires
emailto be thePRIMARY KEYofmytable.