title: How to merge rows in a mysql table
body: <p>I have a table where each row contains a temperature and the weather condition such as:</p>
  
  <pre><code>temp  condition
  17    cloudy
  25    sunny
  22    cloudy
  41    sunny
  12    showers
  38    sunny
  </code></pre>
  
  <p>I am restricted for storage space so I wanted to cut down the size of this table. How can I merge the same weather conditions into one row where the temperature column has the different temperatures with a seperator such as "|"?</p>
  
  <p>Once merged the table would look like:</p>
  
  <pre><code>temp       condition
  17|22      cloudy
  25|41|38   sunny
  12         showers
  </code></pre>
  
  <p>I have changed the data type of the temp column to varchar to allow it to store the new format, but not sure how I can merge the rows now.</p>
  
  <p>I want to overwrite this table with the new format as opposed to just combining it on select query. This will help to lower the file size and make it faster to run queries. If this cannot be done directly on mysql (phpmyadmin) then I would prefer to do this via a PHP script.</p>