Reply to Re: Question about a data structure

Your name:

Reply:


Posted by Geoff Berrow on 01/30/07 08:48

Message-ID: <45be9980$0$28162$4c368faf@roadrunner.com> from Larry in
Honolulu contained the following:

>Well I appreciate the answer, and that sounds fine, except with just 1000
>entries, that's 150,000 records, and thinking about writing the queries to get
>the data out and use it makes my head hurt!

150,000 is still peanuts.

Lets say you have something like this:

answer_id (PK), user_id, question_id, response

Then put users details in a separate table. Questions would also be in
a separate table

question_id(PK), survey_id, question

Getting the answers for a particular user is easy

To get responses you'd have to query the questions table to get all the
questions in an array then loop through this array to get the responses
to the questions.

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

[Back to original 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

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