
Envoyé par
sabotage
Ce n'est pas une jointure qu'il te faut mais une union.
Une jointure sert a croiser des tables qui ont des données communes.
Merci pour cette réponse rapide, en effet je pense que c'est plus vers l'union que je dois me tourner finalement. Après quelques tests, ça retourne toujours une erreur, doit y avoir plein de fautes dans ma commande mais je ne vois pas vraiment...
(SELECT (title LIKE '%super smash%') as found_exact, ( (title LIKE '%super%') + (title LIKE '%smash%') ) AS found_count, id, title, description, rate, preview, genre, type, file_size, vote_up, vote_down, uploader FROM directlink WHERE (title LIKE '%super%' OR title LIKE '%smash%') AND (genre = 'game') ORDER BY found_exact DESC, found_count DESC, (vote_up-vote_down) DESC LIMIT 50) UNION [ALL] (SELECT (title LIKE '%super smash%') as found_exact, ( (title LIKE '%super%') + (title LIKE '%smash%') ) AS found_count, id, title, description, rate, preview, genre, type, file_size, vote_up, vote_down, uploader FROM filehosting WHERE (title LIKE '%super%' OR title LIKE '%smash%') AND (genre = 'game') ORDER BY found_exact DESC, found_count DESC, (vote_up-vote_down) DESC LIMIT 50);
Partager