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
https://forums.phpfreaks.com/topic/230031-id-matching-databases/
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?

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.