NutzCN Logo
问答 nutzdao怎么转义,用@@在mysql中不起作用
发布于 2351天前 作者 qq_a42f26f3 1922 次浏览 复制 上一个帖子 下一个帖子
标签:
select * from 
(SELECT
	obj.*,@@rownum := @@rownum + 1 AS natianalRank
FROM
	(
		SELECT
			b.open_id,
			b.avatar,
			b.nickname,
			sum(donation_num) donation_num
		FROM
			h5.h5_act_movement_donation a
		JOIN h5.h5_act_weixin_follower b ON a.act_id = 1
		AND a.open_id = b.open_id
		GROUP BY
			b.avatar,
			b.nickname
		ORDER BY
			donation_num,
			b.open_id DESC
	) AS obj,
	(SELECT @@rownum := 0) r)a
where a.open_id=@openid
1 回复

有可以了,可能有缓存

添加回复
请先登陆
回到顶部