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 = 'aluno/fernanda-neves-barbosa-dall'anese/595056' at line 5

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