select * from
(
select
t.trade_id, @rownum:=@rownum + 1 trade_rownum
from
board_trade t, (select @rownum:=0) r
where
t.topic_id = 3 and t.is_drop = 0
order by
t.trade_id
) tr
where
tr.trade_id = 1346382
select
*, @rownum:=@rownum + 1 trade_rownum
from
board_trade t, (select @rownum:=0) r
where
t.topic_id = 3 and t.is_drop = 0
order by
t.trade_id