I have a MySQL table: ( post_id varchar, user_id varchar, time timestamp )
I’m doing:
- Get all post_ids by a set of user_ids (IN clause)
- Use offset and limit for pagination (however cursor based pagination will be ok as well)
- Data should be in reverse order by time, either already stored this way or done via “order by”.
Corresponding MySQL query below:
SELECT post_id FROM post_index WHERE user_id IN (+ stringOfUserIds +
) ORDER BY time DESC LIMIT 0,10
Please advise if/how logic this be reproduced in AS? Thank you!