title: Select with unknow fields
body: <p>I have to make a mysql select from a wordpress database :</p>
  
  <pre><code>SELECT wp_posts.ID, wp_posts.post_title AS post_title,
          responsable.meta_value AS responsable,
          nif_cliente.meta_value AS nif_cliente,
          CONCAT_WS(' ',contactos_0_nombre.meta_value,CONCAT('&lt;br&gt;&lt;br&gt;',contactos_1_nombre.meta_value)) AS contactos,
          tipo_de_empresa.meta_value AS tipo_de_empresa,
          tipo_cliente.meta_value AS tipo_cliente
  
          FROM wp_posts
  
          LEFT JOIN wp_postmeta AS responsable 
          ON wp_posts.ID = responsable.post_id AND responsable.meta_key='responsable'
  
          LEFT JOIN wp_postmeta AS tipo_de_empresa
          ON wp_posts.ID = tipo_de_empresa.post_id AND tipo_de_empresa.meta_key='tipo_de_empresa'
  
          LEFT JOIN wp_postmeta AS nif_cliente
          ON wp_posts.ID = nif_cliente.post_id AND nif_cliente.meta_key='nif_cliente'
  
          LEFT JOIN wp_postmeta AS contactos_0_nombre
          ON wp_posts.ID = contactos_0_nombre.post_id AND contactos_0_nombre.meta_key='contactos_0_nombre'
  
          LEFT JOIN wp_postmeta AS contactos_1_nombre
          ON wp_posts.ID = contactos_1_nombre.post_id AND contactos_1_nombre.meta_key='contactos_1_nombre'
  
          LEFT JOIN wp_postmeta AS tipo_cliente
          ON wp_posts.ID = tipo_cliente.post_id AND tipo_cliente.meta_key='tipo_cliente'
  
          WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'clientes'"
  </code></pre>
  
  <p>I want to concate contactos_n_nombre. I can write it manual but 'n' it's dinamic (i don't know how much it is) It can be 0 if there are only one contact, but can be 1000 if this client have more contact methods. </p>
  
  <p>How can i make it to search how many contactos have one client, and concate all of them</p>
  
  <p>Thanks</p>