|
This question is related to this post: http://stackoverflow.com/questions/1764469/sql-design-for-survey-with-answers-of-different-data-types
I have a survey app where most questions have a set of answers that are 1-5. Now we have to do questions that ...
Answer Snippets (Read the full thread at stackoverflow):
CREATE TABLE question_answer ( id INT NOT NULL AUTO INCREMENT PRIMARY KEY, user_id INT NOT NULL, question_id INT NOT NULL,....
Normalize your database, and create a table called question_answer.
I have two suggestions.
|
|
I want to avoid reinventing the wheel and would like to purchase a good question and answer script/software. Where can I find a good one?
Started by Luke101 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
It shouldn....
Perhaps you could have a look at SOClone or Shapado ( sneak peak of a site on Shapado )
It is possible and it may be good idea to create it on a Content Management System (CMS) such as Drupal .
It's not cheap though.
See www.stackexchange.com.
|
|
Hi,
I have a model like:
Question - Id - CreatedOn
Answer - Id - CreatedOn - QuestionID
No I want to get the first question with the newest answer.
I am using SQL Server 2005.
Thanks, Chris
Started by Christian on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
FROM Question Q WHERE Q.id IN (SELECT DISTINCT TOP 5 A.QuestionID FROM Answer A ORDER BY A.CreatedOn)
Something like this:
SELECT TOP 1 Question FROM Questions JOIN Answers ON Questions.Id=Answers.QuestionID ORDER BY....
|
Ask your Facebook Friends
|
I have learned that SO has put questions and answers in the same table. They say that a question will not have a parent id and answers will have parent IDs. Why is it better to do it this way instead of putting questions and answers in separate tables...
Started by Luke101 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In particular One Question has many answers, but each answer belongs only to one question.
Not the same.
|
|
Example scenarios:
I answer a question on Monday, then on Wednesday I come up with better, but completely different answer. Should I delete my original answer before I post another? What if both answers have merit?
I am answering a very broad question...
Started by too much php on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
It's also possible that each answerI feel....
answers in the highest voted answer, someone with the same question wouldn't know which was getting not be obvious to someone asking the question which answer that would be.
|
|
Reading what is currently the top answer to a recent question on how/whether to send users their passwords, I was intrigued that the most popular answer said the following...
storing passwords in such a way that they are retrievable is insecure using ...
Started by Traples on
, 14 posts
by 14 people.
Answer Snippets (Read the full thread at stackoverflow):
The....
But again, knowing the answer to the question.
I'm guessing answers are also hashed, so that the answer is not directly stored.
Anything about you, they can answer an easy question and reset your password.
|
|
Why do people answer questions on Yahoo Answers when they don't know the answer? I notice a lot of people respond to questions even if they don't have an answer. What is the point?
Started by Hugh G on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at yahoo):
Not....
I agree I think they just answer for the points.
They make no sense at all.
They wanted to help you answer your question or because they wanted to gain points in Yahoo Answers of the answers are just plain silly.
|
There can be smart answers to smart questions...but can there be stupid answers to stupid questions?
There can be smart answers to smart questions...but can there be stupid answers to stupid questions?
Started by Matt on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at yahoo):
Yes
or better yet
would a smart answer to a stupid question be a stupid answer? smart and stupid.
|
|
How can you use the following sample data either with a foreach or while -loop?
I get the following sample data by running
$answers = pg_fetch_all ( $result );.
Sample data
[0]=> array(3) { ["answer"]=> string(7) "This is the answer" ["username"...
Started by Masi on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This is how you do the foreach loop
foreach ( $answers as $answer ){ echo $answer['answer'] echo $answer....
Foreach( $answers as $quess ) { $an = $quess['answer']; $name = $quess['username']; $time = $quess.
|
|
So I was trying to answer a "heavily answered" question, like this one , but I didn't know if my answer (Apache Chainsaw, if you insist) has already been written or not.
Is there some kind of a search mechanism to search within all answers to a given ...
Started by Ron Klein on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If paging becomes an issue, there isn't much more of a built-in method (unless you managed to construct one yourself, which may one day be possible when Jeff opens up a StackOverflow API... .
Ctrl+F and search for the terms you want and see if they turn up .
|