title: MySQL concatenating fields but ignoring empty ones
body: <p>I have a MySQL db with a list of people, including their address, which I want to return as one field in a query. It's split into <code>address1, address2, address3, address4, post_code</code> and I want to do something like the following</p>
  
  <pre><code>SELECT CONCAT(`address1`, ' ',  `address2`, ' ', `address3`, ' ', `address4`, ' ', `post_code`) AS `address` FROM `table`
  </code></pre>
  
  <p>So I'll end up with a full string of their address in <code>address</code> which works fine but if some of the fields are empty then I'll end up with a lot of double spaces. How can I eliminate the extra spaces? Is there an easier way than doing an IF() on each field?</p>