Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/02/2010, 13:50
paulkees
 
Fecha de Ingreso: octubre-2004
Mensajes: 768
Antigüedad: 19 años, 6 meses
Puntos: 3
Respuesta: Consulta muestre cadenas NO repetidas

Gracias David...

Sí, había probado con "DISTINCT", lo que pasa que aquel usuario que puso apellidos de investigación separados por coma, punto o espacio, lo toma como uno diferente y por lo tanto lo repite.

Lo intenté así pero no resulta, igual me repite las cadenas!

Código PHP:
$query "SELECT
    DISTINCT investigacion 
    FROM usuarios
    WHERE
    investigacion NOT LIKE '0'
    OR investigacion NOT LIKE '% 0,%'
    OR investigacion NOT LIKE '0,%'
    OR investigacion NOT LIKE '% 0.%'
    OR investigacion NOT LIKE '0.%'
    OR investigacion NOT LIKE '% 0 %'
    OR investigacion NOT LIKE '0 %'
    OR investigacion NOT LIKE '% 0'
    OR investigacion NOT LIKE '%(0)%'
    "