Error (SELECT corsistages.*, regioni.nome as nomeregione, luoghi.nome as nomeluogo, corsistages.nome as nomecorso FROM corsistages JOIN regioni ON corsistages.IDregione = regioni.ID JOIN luoghi ON corsistages.IDlocalita = luoghi.ID WHERE regioni.ID = ORDER BY rand()): 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY rand()' at line 1