ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles SCHLIENGER <gilles.schlien...@cncc.fr>
Subject RE : RE : Using a user variable in a request with MySQL
Date Fri, 12 Jun 2009 07:59:34 GMT
It works great with iBATIS/MySQL.

Thanks a lot Larry and sorry for bothering you with something I could/should have found myself...

Regards
Gilles

________________________________________
De : Larry Meadors [larry.meadors@gmail.com]
Date d'envoi : jeudi 11 juin 2009 17:22
À : user-java@ibatis.apache.org
Objet : Re: RE : Using a user variable in a request with MySQL

I see, try this:

SELECT (@rownum:=@rownum+1), JET_ID
FROM JETON, (SELECT @rownum:=0) r
WHERE JET_FK_ABO_ID = 3;

Found it here: http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/

It might work, I don't have a mysql install handy to try it on. :-/

Larry

Mime
View raw message