Msg#: 4098873 posted 3:59 pm on Mar 16, 2010 (gmt 0)
hi im doing a website for nightlife in london. a user can rate the place they go to out of 1-10. im doing the database on phpmyadmin. i want the user to be able to rate the place as many times as they like. im not sure how to do it so would i be able to get assistance?
Msg#: 4098873 posted 9:40 pm on Mar 16, 2010 (gmt 0)
would i make user_id primary key on both tables?
No, in the example given above, id is the primary key in both tables and user_id is a foreign key in the ratings table. However personally I would make the ID fields a bit more distinct and not have two different id fields in the user table as below.