php - Storing table data into database -


i designing web app users post products it, each product have section "technical specifications".

this like:

subject 1 title 1: description 1 title 2: description 2 title 3: description 3  subject 2 title 1: description 1 

so example tv like:

main details size: 18 inches color: black style: wide hd: yes  supplementary details guarantee: yes support: no 

the above functionality has been made jquery, there + buttons in page, user add new subject sub items, have 4 main subject, each of them have many user wants sub details.

now question is, how should store such details in db easy edit , search? i'm storing table html data db doesn't sound wise.

p.s: while user defining details, product not inserted db yet, need keep data on fly , insert them after user submitted product.

thanks help.

if i'm understanding correctly you'd need 2 tables this.

subject table  - subjectid  - subjectname  details table  - detailsid  - detailsname  - detailsnote  - subjectid 

this 1 many relation have 1 subject entry per table many details entries necessary, when reading data you'd load both tables via join on subjectid.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -