Custom Query: Counting number of pages added after a certain date
Permalink
Hey everyone,
I have a page (cID 81) that is a parent to 100+ pages. I want to be able to run a query that returns the ids of any approved sub-page of 81 that has a creation date on or after the user's last login. So basically I can say "5 new articles were added since your last login: " and then list them out as links.
I see that the Collections table has 'cDateAdded' and the users table has 'uLastLogin' but I'm unsure where the link exists that assigns a Collection to a parent (as I only want to join in any approved page with the parent id of 81).
Thanks for any help!
I have a page (cID 81) that is a parent to 100+ pages. I want to be able to run a query that returns the ids of any approved sub-page of 81 that has a creation date on or after the user's last login. So basically I can say "5 new articles were added since your last login: " and then list them out as links.
I see that the Collections table has 'cDateAdded' and the users table has 'uLastLogin' but I'm unsure where the link exists that assigns a Collection to a parent (as I only want to join in any approved page with the parent id of 81).
Thanks for any help!
I'd recommend using the "Page List" API to perform this query instead of writing a SQL statement. Something like this should work:
Thank you! That worked amazingly!
AWESOME. THANKS FOR SHARING :o