Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL union query righe duplicate

Soluzione alternativa. Potresti usare:

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