0

I send request http://xxxx.com/test/?app_idx=80 via browser.

But the ibatis parses this wrong.

select
    CONCAT('http://localhost:8080/apps/icon/download/?app=', app_idx)
from test
where app_idx = ?;

I expected my query to be

select
    CONCAT('http://localhost:8080/apps/icon/download/?app=', app_idx)
from test
where app_idx = **80**;

But the real was 'http://localhost:8080/apps/icon/download/?app=80'.

select
    CONCAT('http://localhost:8080/apps/icon/download/80app=', app_idx)
from test
where app_idx = **?**;

Is there a way to make it right?

Patrick Jeon
  • 1,684
  • 5
  • 24
  • 31

1 Answers1

1

Use

select CONCAT('?', app_idx)
from test
where app_idx = ?;

and pass

http://localhost:8080/apps/icon/download/?app=

as the first parameter.

stevedbrown
  • 8,862
  • 8
  • 43
  • 58