I would have to see this query. It could be that it needs parameters. That my prevent external use.
(just send the sql)