erro na consulta: SELECT imovel_condominio.*, imovel_foto.*,praia.praia AS nome_praia FROM imovel_condominio, imovel_foto , praia WHERE imovel_condominio.id_foto_capa = imovel_foto.id_imovel_foto AND imovel_condominio.id_praia = praia.id_praia AND imovel_condominio.id_imovel_tipo = ORDER BY RAND() LIMIT 30MySQL Error: 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 'ORDER BY RAND() LIMIT 30' at line 8