I've been trying to get a query running that would select the the last 3 authors that have posted to the blog, so i can have a most recent author system running.
the SQL I am using is here:
Code: Select all
SELECT DISTINCT
serendipity_authors.authorid AS authorID, serendipity_authors.realname AS authorName, serendipity_entries.isdraft, serendipity_entries.timestamp
FROM serendipity_groups, serendipity_authorgroups, serendipity_authors,serendipity_entries
WHERE serendipity_groups.name='Featured Author' AND serendipity_authorgroups.groupid='4' AND serendipity_authorgroups.authorid=serendipity_authors.authorid AND serendipity_authors.authorid=serendipity_entries.authorid AND serendipity_entries.isdraft='false' ORDER BY serendipity_entries.timestamp DESC limit 0,3here is an output from the mysql shell for the query above:
Code: Select all
+----------+---------------------+---------+------------+
| authorID | authorName | isdraft | timestamp |
+----------+---------------------+---------+------------+
| 4 | Jane Thurnell-Read | false | 1178184131 |
| 12 | Bonnie Siefers | false | 1178109789 |
| 12 | Bonnie Siefers | false | 1178065291 |
+----------+---------------------+---------+------------+
BTW - Featured Author, and groupid 4 relate to one another in the [/code]