Quote:
Originally Posted by Razasharp
Harmor19 - thanks for the help  (I think your hack works in a different way, whereby the 'fields' are actually forms, and the data entered simply gets appended to the post? If so any chance you doing one where the field data is stored in the db seperately? saves me the fuss and I could make a donation  )
|
As I said "I suggest creating another table that holds the user's ID, the question ID and their answer.
If you know how to use 'LEFT JOIN' then you do not need to make a field for "thread ID" but since you do not know that much you should add "thread ID"."
When an user edits their post call the table where the thread ID matches the thread ID in the table and where the user ID of the person browsing matches the user ID in the table.
Then you fill in the form question with the data received from said table.
New table:
my_thread_fields
Fields:
questionid (key)
ThreadID = (INT 20)
question (text)
status (tinyint 1) (to "show" or "hide" the question.)
New table:
my_thread_fields_answers
Fields:
answerid (key)
UserID (INT 40)
ThreadID = (INT 20)
questionid (INT 10)