la query:
"SELECT * FROM tabella WHERE 1". $like; (il valore è 0 o 1)

la echo delle query

SELECT * FROM tabella WHERE 0 and testo LIKE '%ciao%'
SELECT * FROM tabella WHERE 0 or testo LIKE '%ciao%'

se cambio e metto 1
SELECT * FROM tabella WHERE 1 and testo LIKE '%ciao%'

questa che segue (con or) è l'unica query che sembra funzionare.. ma mi restituisce tutta la tabella.. e il termine ciao non è proprio presente!

SELECT * FROM tabella WHERE 1 or testo LIKE '%ciao%'

****

help!