Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Linhas duplicadas da consulta de união do MySQL


Gambiarra. Você poderia usar:
SELECT username, pic0 
FROM ".$table." 
WHERE ( username LIKE '%lunch%' ) 
   OR ( username IS NOT NULL 
      AND age BETWEEN 28 AND 45 
      AND willingness LIKE '%lunch%' 
      )
ORDER BY ( username LIKE '%lunch%' ) DESC