title: How to combine the same id and mrege the data into one record?
body: <p>I have a database structure like so:</p>
  
  <pre><code>Car
   - id   
   - carname
   - image
   - category
   - status
  
  Parts
   - partid
   - partname
  
  CarParts
   - carpartid
   - carid(fk)
   - partid(fk)
   - amountid(fk)
  
  Category
   - id
   - categoryname
  
  Amount
   - amountid
   - amountvalue
  </code></pre>
  
  <p>Right now this is what I am working on:</p>
  
  <pre><code>SELECT * FROM carparts
  INNER JOIN car on carparts.carpartid = car.id 
  
  INNER JOIN parts on parts.partid = carparts.carpartid
  
  INNER JOIN amount on amount.amountid = carparts.amountid where status = 1
  </code></pre>
  
  <p>This returns duplicate records when there is more than one carpart in the carparts table. How can I combine the carparts.id and car.id to one row but still have multiple partname for that one record?</p>