Jump to content

$id Matching (Databases)


justlukeyou

Recommended Posts

Hi,

 

I am in the procress of creating discussion system however I am a bit puzzled about the best way to go about it.

 

I am starting the discussion by creating an ID number and then match the answer to the initial ID number.  However, I dont know whether if is best to put the responses into a different database.

 

I'm a bit puzzled how ID matching systems works.

 

Lets say:

 

Question 1 =    ID1

Question 2 =    ID2

Question 3 =    ID3

Question 1 Answer 1    =  ID4  (How is this matched to ID1)

Question 2 Answer 1    =  ID5  (How is this matched to ID2)

 

is this based on preg_match?

Link to comment
Share on other sites

Thanks,

 

This sound VERY complicated.

 

I was planning on adding an ID number to each question and then linking the answer to the relevant ID.

 

How does this process link it?

 

What if two people submit exactly the same question if the ID number is always 0?

Link to comment
Share on other sites

Hi,

 

Can I do it like this:

 

Create a Question ID (QID) with the question in 'QuestionsTable' and then when someone answers the questions I put the Answer QID and answer next to an Answer ID (AID) into a table called "AnswersTable" and that should mach the Question with the Answer by using two tables.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.