plainblack.com
Username Password
search
Bookmark and Share

Latest 10 Active pages edited on your system

Yet another report showing the latest 10 items on your system. This however take the startDate and endDate specified into account thus only showing active content. SQL report:

SELECT
       CONCAT('/index.pl/',page.urlizedtitle),
       wobject.title,  concat(s1.fieldData, " ", s2.fieldData),
  from_unixtime(wobject.lastedited, '%d-%m-%y')
   FROM page, userProfileData as s1, wobject
INNER Join userProfileData AS s2 on (s1.userId = s2.userId )WHERE 
 page.pageid = wobject.pageid and
 (s1.fieldName = "firstName" and editedBy = s1.userId) and s2.fieldName = "lastName" and
    unix_timestamp() > wobject.startDate
  AND
    unix_timestamp() < wobject.endDate
ORDER BY wobject.lastedited DESC LIMIT 10

Report template:

see attached file!

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4scotru: "
I tried pasting this SQL report in, but I'm only getting the latest 10 edits by a particular user.  Any ideas?

Thanks!
"
4aaronp: "
This only selects pages that are not in the trash and are viewable by Visitor.

SELECT
 page.urlizedTitle, page.title,
 wobject.title, CONCAT(s1.fieldData, " ", s2.fieldData),
 FROM_UNIXTIME((wobject.lastedited + 18000), '%W, %b %D, %l:%s%p')

FROM
 page, userProfileData AS s1, wobject

INNER JOIN
 userProfileData AS s2 ON (s1.userId = s2.userId)

WHERE
 page.pageid=wobject.pageid
 AND (s1.fieldName="firstName" AND editedBy=s1.userId)
 AND s2.fieldName="lastName"
 AND UNIX_TIMESTAMP() > wobject.startDate
 AND UNIX_TIMESTAMP() < wobject.endDate
 AND (wobject.groupIdView = 1 OR wobject.groupIdView = 7)
 AND page.title!="Trash"

ORDER BY
 wobject.lastedited DESC

LIMIT"
Downloadreport-template.txt report-template.txt
LinksNo Support Offered
Statistics Downloads: 402
Views: 6499
Rating: 4
Updated: 8/12/2005
Keywords miscellaneous
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved