Mysql
 sql >> Base de données >  >> RDS >> Mysql

Mysql union query lignes en double

Solution de contournement. Vous pouvez utiliser :

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