Originariamente inviato da luca200
SELECT *, IFNULL(campo,3,IF(campo='',2,1)) as ordine FROM TABELLA ORDER BY ordine, campo
Ricevo questo errore:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' IF( descrizione = '' , 2 , 1 ) ) as ordine FROM prova ORDER BY ordine , descrizione
LIMIT' at line 1