MWX/SpamFerret/views/AttemptsEx: Difference between revisions

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | views
Jump to navigation Jump to search
m (1 revision imported: moving here)
m (Woozle moved page SpamFerret/views/AttemptsEx to MWX/SpamFerret/views/AttemptsEx without leaving a redirect: most mediawiki extensions belong under MWX now)
 
(No difference)

Latest revision as of 20:14, 1 May 2022

About

  • Purpose: Eventually, a SpecialPage with reports would be nice, but for now you can see what's being blocked, and where the spam attempts are coming from, with this query conveniently packaged in a stored "view":

SQL

<mysql>CREATE OR REPLACE VIEW `AttemptsEx` AS

 SELECT
   a.ID,
   a.`When` AS WhenDone,
   a.Code,
   a.ID_Pattern,
   p.Pattern,
   a.ID_Client,
   c.Address,
   c.doBlock,
   a.PageServer,
   a.PageName,
   a.MatchText,
   a.didAllow
 FROM
   (
     (attempts AS a
       LEFT JOIN patterns AS p
       ON (a.ID_Pattern = p.ID)
      ) LEFT JOIN clients AS c
        ON (a.ID_Client = c.ID)
    ) ORDER BY a.ID DESC;</mysql>