SELECT
bef.*
FROM
(
SELECT
t.*
FROM
(
SELECT
@rownum :=@rownum + 1 AS rownum,
t_article.*
FROM
(SELECT @rownum := 0) r,
t_article
WHERE area_id = '69a7cc0cb74f719e58445f1fc3806387'
AND category_id = 'a7c7a15302fe4942955a962aea9d5bb2'
ORDER BY top_tag desc,create_time desc
) t
WHERE
t.rownum < (
SELECT
w.rownum
FROM
(
SELECT
@rownum :=@rownum + 1 AS rownum,
t_article.*
FROM
(SELECT @rownum := 0) r,
t_article
WHERE area_id = '69a7cc0cb74f719e58445f1fc3806387'
AND category_id = 'a7c7a15302fe4942955a962aea9d5bb2'
ORDER BY top_tag desc,create_time desc
) w
WHERE w.article_id = '353d2d71a68b44d6a3fef7928aa1bcfd'
)
ORDER BY
t.rownum DESC
LIMIT 1
) bef
UNION ALL
SELECT
aft.*
FROM
(
SELECT
t.*
FROM
(
SELECT
@rownum :=@rownum + 1 AS rownum,
t_article.*
FROM
(SELECT @rownum := 0) r,
t_article
WHERE area_id = '69a7cc0cb74f719e58445f1fc3806387'
AND category_id = 'a7c7a15302fe4942955a962aea9d5bb2'
ORDER BY top_tag desc,create_time desc
) t
WHERE
t.rownum > (
SELECT
w.rownum
FROM
(
SELECT
@rownum :=@rownum + 1 AS rownum,
t_article.*
FROM
(SELECT @rownum := 0) r,
t_article
WHERE area_id = '69a7cc0cb74f719e58445f1fc3806387'
AND category_id = 'a7c7a15302fe4942955a962aea9d5bb2'
ORDER BY top_tag desc,create_time desc
) w
WHERE w.article_id = '353d2d71a68b44d6a3fef7928aa1bcfd'
)
ORDER BY
t.rownum ASC
LIMIT 1
) aft