Alla fine ci sono arrivato così:
codice:
SELECT caratteristiche AS PREGI
FROM utenti
JOIN caract ON aspetto1 = valori
WHERE aspetto1 LIKE '1%' OR aspetto1 LIKE '2%'
UNION
SELECT caratteristiche AS PREGI
FROM utenti
JOIN caract ON aspetto2 = valori
WHERE aspetto2 LIKE '1%' OR aspetto2 LIKE '2%'
UNION
SELECT caratteristiche AS PREGI
FROM utenti
JOIN caract ON aspetto3 = valori
WHERE aspetto3 LIKE '1%' OR aspetto3 LIKE '2%'
UNION
SELECT caratteristiche AS PREGI
FROM utenti
JOIN caract ON aspetto4 = valori
WHERE aspetto4 LIKE '1%' OR aspetto4 LIKE '2%'
UNION
SELECT caratteristiche AS PREGI
FROM utenti
JOIN caract ON aspetto5 = valori
WHERE aspetto5 LIKE '1%' OR aspetto5 LIKE '2%'
Come faccio però a fare questa query passandogli un valore di ID specifico? Il row id viene tirato fuori dalla pagina in fase di apertura.....come lo applico alla query di cui sopra?
GRAZIE!!
Tiziano