You are here: Re: Storing array in a row « PHP Programming Language « IT news, forums, messages
Re: Storing array in a row

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация