How would you save the quote products in a database? Serialize data?
http://cl.ly/6419969e30cd26e2f32a
They can create however many rows they want... It's for a quote system. Create a quote with however many products. I need to save X Product At X Qty and X Price foreach one.
Serialize in the only thing I could come up with, but I hate unserializing so very much. I didn't know if there was a quicker/more efficient way.
开发者_运维百科I also have all this information to store with / link with it http://cl.ly/40cc9fea47932b3740b2
PHP (Kohana) > mySQL
Thanks for any input you may have.
I would split the items on a quote into a separate child table:
Quote QuoteItem Item
========= =========== ============
QuoteID QuoteID ItemID
Subject ItemID Description
ValidUntil Quantity Cost
Address Price
Create one entry in the quote table, and then for each item on that quote create an entry in the QuoteItem table with the corresponding QuoteID.
精彩评论