title: PHP/MySQL - Storing array data as JSON, bad practice?
body: <p>I was wondering whether or not storing an array as a JSON string in a mysql text field is good practice.  </p>
  
  <p>I am creating an invoice which allows the user to add an unlimited number of products to the invoice.  When the form is submitted, it takes out all the blank items and such, but I will typically be left with 2-5 items depending.  Each item has a sku, price, name, and description.</p>
  
  <p>My options for this situation are (1) to create a new product table, add each item as a new row, link it with the invoice table, and call both tables when accessing data. Or (2) store all the product data as a single JSON text field in the invoice table, and then I am not creating or accessing another table.</p>
  
  <p>Since I am pretty rigid with MySQL programming, I get the feeling that using JSON in MySQL would be frowned upon.  Am I right?  Can someone shed some light on this?</p>