Posted by Rik on 11/19/40 11:47
guitarromantic@gmail.com wrote:
> Rik wrote:
>
>> An extra table would help to make the data more accessable.
>>
>> TABLE reviews
>> review_id
>> some_other_fields
>>
>> TABLE staff
>> staff_id
>> some_other_fields
>>
>> TABLE staff_reviews
>> review_id
>> staff_id
>
> Just to clarify - so when I display a review, would I have to then
> search staff_reviews for $foo (review id) and then select all the
> associated staff_ids to then display my links and stuff?
>
> I think this is a better method also because as well as each review
> having multiple authors, it has multiple scores too (currently we just
> write the individual scores in the body of the review and store the
> average score in the db - with this system I can store a score for
> each review in staff_reviews and then just use php to display the
> average, right?
Yup, just add the review_score field to staff_revies. You could even let
MySQL take care of the average.
Grtz,
--
Rik Wasmus
[Back to original message]
|