Sunday, August 3, 2008

A trophy

This SQL query solved a problem that was bugging me for two days:
SQLStr = "SELECT TOP 10 l.log_message, MAX(l.log_timestamp) AS high_time,
l.log_type, l.page_id, l.user_id, u.user_name, u.user_displayname " & _
"FROM tbluserlogs AS l, tblusers AS u, tblpages AS p WHERE l.user_id = '" &
user_id & "' AND l.site_id = '" & SiteID & "' AND l.user_id =
u.user_id " & _ "AND (l.page_id IS NULL OR (p.page_id = l.page_id AND "
& AllowedPermissions & ")) " & _ "GROUP BY l.log_message,
l.log_type, l.page_id, l.user_id, u.user_name, u.user_displayname ORDER BY
high_time DESC"
The above won't mean anything to anyone but me. It's posted here simply as a trophy of a personal victory in a battle I raged today.

I am often exclaiming to my non-caring computer, "Ha! I beat you!"

Labels:

Jeremy Parnell .com Send Message My Blog Recent & Current Projects Photos, Videos, Etc. View My Profile Send Message