0

我的查询:

SELECT videoid FROM related_videos WHERE videoid='$current_page_video_id' order by videoid desc;

结果返回:
1)videoid = 135;
2)视频ID = 126;
3) 视频ID = 113;
4)视频ID = 95;
5)视频ID = 32;
6) 视频ID = 19;
7) 视频ID = 13;(如何知道7号位置?)
8) videoid = 9;
9) 视频ID = 6;

假设我的 current_page_video_id 是 13,我怎样才能在上面的查询中找到这个 videoid(13) 的位置?

4

1 回答 1

2
SELECT COUNT(*) FROM related_videos WHERE videoid >= 13
于 2012-10-12T12:54:36.953 回答