11-09-2008, 04:47 AM
|
#14 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by Tanax
@up- So.. how do you add rating to the user? If I rate someone as 3 of 5, then what will be inserted into db?
And also, how do you count how many ppl have rated?
|
1. How do you add rating to the user
Insert a row with the user ID being the ID of the user being rated and the rating as an integer ranging from 1-5. Individual database structures will vary, but that is the basic idea.
2. If I rate someone as 3 of 5, then what will be inserted into db?
A value of 3 and the ID of the user
3. And also, how do you count how many ppl have rated?
How many people have submitted a rating? You would have to add a column that contains the ID of the person who rated the person and write a query to count the distinct user IDs.
|
|
|
|