in pratica devo fare la query in base al numero di notti... ma solo il whereOriginariamente inviato da piero.mac
non e' chiaro il dilemma....
prova con CASE
codice:$query=("SELECT *, CASE when notti = 2 then 2 when notti = 3 then 3 when notti = 4 then 4 else 0 END as tipo FROM tabella");![]()