获取某个数据所在数据列表中的行数 mysql


select * from (
select
@rownum := @rownum+1 as rownum,
goods_id
from table_goods, (select @rownum:=0) t where test_id = 10) m
where m.goods_id = 57806

posted @ 2016-03-28 14:14  洋葱土豆随心匠  阅读(1275)  评论(0编辑  收藏  举报