As I have three WHERE tables
select login, nome_hotel from extranet_login, extranet_hoteis, hoteis
where extranet_login.id_login=extranet_hoteis.id_login
and extranet_hoteis.id_hotel=hoteis.id_hotel
and extranet_login.login='admin';
for INNER JOIN
SELECT login, nome_hotel
FROM extranet_login
INNER JOIN extranet_hoteis ON extranet_login.id_login = extranet_hoteis.id_login
INNER JOIN hoteis ON hoteis.id_hotel = extranet_hoteis.id_hotel
INNER JOIN extranet_login ON extranet_login.login = 'admin';
Is it wrong?