select pages.includestop, ifnull(parent.alias, '') as parentalias, ifnull(parent.title, '') as parent, pages.*, if(pages.alias like 'cursos-coaching-internacional-%' or pages.alias like 'turmas/curso-de-coaching-%',1,0) as selector, if(pages.authortabledefid=2,clients.name,users.firstname) as authorname, pages.authortabledefid, pages.creationdate, pages.parentid, pages.id from pages as pages left join pages as parent on parent.id = pages.parentid left join clients on clients.id=pages.authorid and pages.authortabledefid=2 left join users on users.id=pages.authorid and pages.authortabledefid!=2 where (pages.alias='cursos-coaching-internacional-Belo-Horizonte-MG' or pages.alias='cursos-coaching-internacional-Belo-Horizonte-MG/') and pages.isdraft=0 and pages.catid!=60 order by pages.id desc limit 0,1