Saturday, 15 June 2013

database - How should I setup my mySQL tables for this simple php points system? -



database - How should I setup my mySQL tables for this simple php points system? -

hello trying figure out best way setup 2 mysql tables simple points system?

what have:

1 - users table id (unique),name,email,etc 1 - points table id (auto incrementing),user_id (corresponds id field in user table), points

currently writing points table , letting id field auto increment... , setting user_id field , points fields php in query.

is "proper" way set up? id user table mutual user_id field in points table? or there improve way?

i sense maybe should have 2 fields in points table (id,points) , have id's correspond? not sure what's best? should doing here?

i want able have function or 2 allow me update points field user... or read it... etc?

thanks helping!

mysql database database-design points table-structure

No comments:

Post a Comment