cmdobueno's avatar

Query Results Based On "published_at"

Table Concept (Slimmed down for simplistics sake

Articles Table:
id
title
content
published_at
created_at
updated_at

Goal:

A user inputs a date (lets say 15 December 2019), we process a search to the server and send back the user 100 results, all articles published on the date, and whatever space is left we split between before and after the requested date.

I hope that makes sense, my head just can not grasp what I need, though I have a feeling it will be rather simple. Additionally I highly prefer to keep pagination working.

Any advise would be amazing. I am using an Article Model, basically standard practice and such.

0 likes
2 replies
cmdobueno's avatar

But that would not provide me what I am looking for.

I want to return (as an example) 11 results where #5 (the middle) would be the return of the date searched for.

Please or to participate in this conversation.