Řešení. Můžete použít:
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
Řešení. Můžete použít:
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