Q&A for Joomla! administrators, users, developers and designers
select postID [Post Link] , case when comment like 'to http://serverfault.com/%' then 'severfault' when comment like 'to http://meta.stackoverflow.com/%' then 'meta.so' when comment like 'to http://security.stackexchange.com/%' then 'security.se' when comment like 'to http://english.stackexchange.com/%' then 'english' when comment like 'to http://superuser.com/%' then 'superuser' when comment like 'to http://dba.stackexchange.com%' then 'dba.se' end target, comment from postHistory where posthistoryTypeid in (17, 35) order by creationdate desc