Erro: -420 Database 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 'anese/595056' or shorturl.name = 'aluno/fernanda-neves-barbosa-dall'anese/595056' at line 5

Statement: select shorturl.name, shorturl.url, shorturl.header, shorturl.relatedid, pages.title, pages.alias
from shorturl
left join pages on pages.id = shorturl.relatedid and relatedtabledefid = 28140
where
((shorturl.name = 'aluno/fernanda-neves-barbosa-dall'anese/595056' or shorturl.name = 'aluno/fernanda-neves-barbosa-dall'anese/595056?')
or (shorturl.name like '/aluno/*'))
and shorturl.inactive=0 and shorturl.companyid=1
order by pages.id desc