Ver originalSELECT p.id AS did, p.*, g.nombre as generonombre,CASE WHEN CHAR_LENGTH(p.alias) THEN CONCAT_WS(':', p.id, p.alias) ELSE p.id END as slug,CASE WHEN CHAR_LENGTH(g.alias) THEN CONCAT_WS(':', g.id, g.alias) ELSE g.id END as generoslugFROM __documentos_subgeneros AS pLEFT JOIN __documentos_generos AS g ON g.id = p.idgenero