Hello,

I'm using iBATIS (2.3.4.726) integrated with Spring, MySQL 5.0 (iBATOR with 
Eclipse) and I love it.

I'm faced with a specific need where I have to use a MySQL user variable.

I need to execute the following (simplified) request from my java code:

SET @NUM=0;
SELECT (@NUM:=...@num+1), JET_ID FROM JETON
    WHERE JET_FK_ABO_ID = 3;

If I put this inside a <select> tag in my SqlMap, it complains
If I put this in 2 successive queries, the user variable might not be reset if 
it's not in the same connexion

Ideally, I would even like to have my variable use a different custom name 
everytime, just in case of concurrent calls.

Would anyone have any idea as to how to do that ?
Thanks a lot in advance!
Regards
Gilles

Reply via email to