SELECT
*
FROM
`t_ana` AS a
JOIN (
SELECT
ROUND(
RAND() * (
SELECT
MAX(id)
FROM
`t_ana`
)
) AS id
) AS t2
WHERE
a.id >= t2.id
AND a.`status` = 1
ORDER BY
a.id ASC
LIMIT 1
网友评论