SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-07-16", DATEDIFF(`media`.`mediaCreated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-07-16", DATEDIFF(`media`.`mediaUpdated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-07-16", DATEDIFF(`userLastUpdate`, "2019-07-16"), DATEDIFF("2019-07-16", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-07-16", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-07-16"), DATEDIFF("2019-07-16", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=3 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-07-16", "2018-07-16") AND IF(`mediatypes`.`mtFuture`=1, "2020-07-15", "2019-07-16")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-07-16", DATEDIFF(`media`.`mediaCreated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-07-16", DATEDIFF(`media`.`mediaUpdated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-07-16", DATEDIFF(`userLastUpdate`, "2019-07-16"), DATEDIFF("2019-07-16", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-07-16", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-07-16"), DATEDIFF("2019-07-16", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=3 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-07-16", "2018-07-16") AND IF(`mediatypes`.`mtFuture`=1, "2020-07-15", "2019-07-16")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
SELECT SQL_CALC_FOUND_ROWS SQL_NO_CACHE `mediatypes`.`mtID` AS `mediaTypeID`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(`users`.`userDisplayName`, " / ", `media`.`mediaTitle`), `media`.`mediaTitle`) AS `name`,`media`.`mediaTitle` AS `title`,`users`.`userDisplayName` AS `displayname`,`mediatypes`.`mtCode` AS `media`,IF(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")="", "", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IF(CHAR_LENGTH(`media`.`mediaText`)>220, CONCAT(SUBSTRING(`media`.`mediaText`, 1, 220), "..."), `media`.`mediaText`), "\r", ""), "\n", " "), "&", "&"), "\"", """), "\'", "'"), "<", "<"), ">", ">")) AS `text`,IF(`media`.`mediaFile`!="" AND `mediatypes`.`mtImage`+`mediatypes`.`mtVideo`!=0, CONCAT("media/", `networkAlias`, "/", `mediatypes`.`mtCode`, "/", IF(`mediatypes`.`mtVideo`=1, SUBSTRING(`media`.`mediaFile`, 1, LOCATE(".", `media`.`mediaFile`)-1), `media`.`mediaFile`)), (SELECT IF(`avatar`.`mediaFile`!="", CONCAT("media/", `networkAlias`, "/", `avatarmt`.`mtCode`, "/", `avatar`.`mediaFile`), "") FROM `media` AS `avatar`, `mediatypes` AS `avatarmt` WHERE `avatar`.`mediaUser`=`media`.`mediaUser` AND `avatar`.`mediaType`=`avatarmt`.`mtID` AND `avatarmt`.`mtCode`="profiles" LIMIT 1)) AS `image`,CONCAT("/", `users`.`userSeoName`, "/") AS `pubHref`,CONCAT("/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/")), "") AS `href`,CONCAT("https://", `networkUrl`, "/", `users`.`userSeoName`, "/", IF(`mediatypes`.`mtCode`="profiles", "", CONCAT(`media`.`mediaSeoName`, "/"))) AS `abshref`,CASE WHEN `users`.`userNetwork`=7 AND `users`.`userElevation`>=99 THEN "special" WHEN `mediatypes`.`mtCode` IS NULL OR `mediatypes`.`mtCode`="profiles" THEN `users`.`userType` ELSE `mediatypes`.`mtCode` END AS `class`,IF(`mediatypes`.`mtDate`=1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`=`media`.`mediaDate`, DATE_FORMAT(`media`.`mediaDate`, "%a %d %b %Y"), CONCAT(DATE_FORMAT(`media`.`mediaDate`, CASE WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y%m")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y%m") THEN "%a %d" WHEN DATE_FORMAT(`media`.`mediaDate`, "%Y")=DATE_FORMAT(`media`.`mediaDateEnd`, "%Y") THEN "%a %d %b" ELSE "%a %d %b %Y" END), " to ", DATE_FORMAT(`media`.`mediaDateEnd`, "%a %d %b %Y"), " (", CASE WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<7 THEN CONCAT(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1, " days") WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<=28 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/7)=1, " week", " weeks")) WHEN DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<365 THEN CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417), IF(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/30.417)=1, " month", " months")) ELSE CONCAT(ROUND((DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1)/365), IF(DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`)+1<730, " year", " years")) END, ")")), "") AS `date`,`media`.`mediaDate` AS `rssdate`,DATE_FORMAT(`media`.`mediaDate`, "%Y-%m-%dT%TZ") AS `isodate`,IF(`mediatypes`.`mtCode`="profiles", CONCAT(UPPER(SUBSTRING(`userType`, 1, 1)), SUBSTRING(`userType`, 2)), `mediatypes`.`mtName`) AS `type`,((IF(`weightingCreated`>0 AND `media`.`mediaCreated`!="0000-00-00" AND `media`.`mediaCreated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaCreated`>"2019-07-16", DATEDIFF(`media`.`mediaCreated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaCreated`)))))*`weightingCreated`, 0))+(IF(`weightingUpdated`>0 AND `media`.`mediaUpdated`!="0000-00-00" AND `media`.`mediaUpdated` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`media`.`mediaUpdated`>"2019-07-16", DATEDIFF(`media`.`mediaUpdated`, "2019-07-16"), DATEDIFF("2019-07-16", `media`.`mediaUpdated`)))))*`weightingUpdated`, 0))+(IF(`weightingProfileupdated`>0 AND `userLastUpdate`!="0000-00-00" AND `userLastUpdate` BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(`userLastUpdate`>"2019-07-16", DATEDIFF(`userLastUpdate`, "2019-07-16"), DATEDIFF("2019-07-16", `userLastUpdate`)))))*`weightingProfileupdated`, 0))+(IF(`weightingDate`>0 AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))!="0000-00-00" AND IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN "2019-04-23" AND "2019-10-08", ((1.1904761904762*(84-IF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`)))>"2019-07-16", DATEDIFF(IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))), "2019-07-16"), DATEDIFF("2019-07-16", IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))))))))*`weightingDate`, 0))+(IF(`weightingDuration`>0 AND `mediatypes`.`mtDate`=1 AND `mediatypes`.`mtDateEnd`=1 AND IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`)) BETWEEN 0 AND 365, (100-((100/365)*IF(`mtFuture`=1, DATEDIFF(`media`.`mediaDateEnd`, `media`.`mediaDate`), DATEDIFF(`media`.`mediaDate`, `media`.`mediaDateEnd`))))*`weightingDuration`, 0))+(IF(`weightingProximity`>0 AND (3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<100, (IF((3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))))<10, 100, 100-(100/(3959*ACOS(COS(RADIANS(51.803509))*COS(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`)))*COS(RADIANS(IFNULL(`media`.`mediaLongitude`, `userLongitude`))-RADIANS(-0.208628))+SIN(RADIANS(51.803509))*SIN(RADIANS(IFNULL(`media`.`mediaLatitude`, `userLatitude`))))))))*`weightingProximity`, 0))+(IF(`weightingSpecial`>0 AND `userNetwork`=7 AND `userElevation`>0, (`userElevation`)*`weightingSpecial`, 0))+(IF(`weightingTotalitems`>0 AND `userTotalItems`>0, ((100/11)*IF(`userTotalItems`>11, 11, `userTotalItems`))*`weightingTotalitems`, 0))+(IF(`weightingMediaviews`>0 AND `media`.`mediaViews`>0, ((100/25351)*`media`.`mediaViews`)*`weightingMediaviews`, 0))+(IF(`weightingProfileviews`>0 AND `userProfileViews`>0, ((100/2605)*`userProfileViews`)*`weightingProfileviews`, 0)))/(`weightingCreated`+`weightingUpdated`+`weightingProfileupdated`+`weightingDate`+`weightingDuration`+`weightingProximity`+`weightingSpecial`+`weightingTotalitems`+`weightingMediaviews`+`weightingProfileviews`) AS `relevance` FROM `media`, `users`, `mediatypes`, `networks`, `weightings` WHERE `media`.`mediaActive`=1 AND `media`.`mediaEncoding`=0 AND (`media`.`mediaChecked`=0 OR `media`.`mediaApproved`=1) AND `userID`=`media`.`mediaUser` AND `networkID`=`userNetwork` AND `userPublish`=1 AND `userActive`=1 AND `mediatypes`.`mtID`=`media`.`mediaType` AND `weightingNetwork`=7 AND `weightingType`=`media`.`mediaType` AND `users`.`userID`=5744 AND `mediatypes`.`mtID`=3 AND IF(`mediatypes`.`mtDate`=0, 1, IF(`mediatypes`.`mtDateEnd`=0 OR `media`.`mediaDateEnd`="0000-00-00", `media`.`mediaDate`, IF("2019-07-16" BETWEEN `media`.`mediaDate` AND `media`.`mediaDateEnd`, "2019-07-16", IF(`media`.`mediaDate`>"2019-07-16", `media`.`mediaDate`, `media`.`mediaDateEnd`))) BETWEEN IF(`mediatypes`.`mtFuture`=1, "2019-07-16", "2018-07-16") AND IF(`mediatypes`.`mtFuture`=1, "2020-07-15", "2019-07-16")) GROUP BY `media`.`mediaID` ORDER BY `relevance` DESC LIMIT 0, 15;
Creative Hertfordshire / Events / Events / TrestleTheatre / Upcoming / 1 to 12 of 12

Events

Find out about arts, cultural and creative events across Hertfordshire.

To find events near you, select map view from the left hand menu and enter your postcode. Events are regularly featured in the newsletter and via our social media channels which reach thousands of local individuals and businesses.

To add an event, join our network and login to your Member profile, alternatively refer to our User Guides. .

Events / TrestleTheatre / Upcoming / 1 to 12 of 12

Upcoming / Today / Jul / Aug / Sep / Oct / Nov / Dec / Jan / Feb / Mar / Apr / May / Jun / Archive

Philippe Gaulier Workshop

Mon 08 to Wed 17 Jul 2019 (1 week)

Philippe Gaulier Workshop

He’s coming back! -and this time for 2 weeks. Small Nose are really excited to announce that Philippe Gaulier will be running two weeks of workshops in July 2019. This is the perfect opportunity for those who have nev.....Read more

Trestle SUMMER INTENSIVE TRAINING | Making Mask Work

Tue 23 to Fri 26 Jul 2019 (4 days)

Trestle SUMMER INTENSIVE TRAINING | Making Mask Work

23rd – 26th July 2019 | 10am-4pm This Summer Trestle will be running a 4 day ‘Making Mask Work’ intensive course for practitioners, teachers and makers. The course will focus on devising and storytelling looking at sc.....Read more

Trestle School of Drama | Summer Holiday Workshops 2019

Mon 05 to Fri 09 Aug 2019 (5 days)

Trestle School of Drama | Summer Holiday Workshops 2019

This Summer holiday Trestle will be running 2 unique holiday programmes jam packed full of drama and games for ages 4-7 and 8-14. Each day the participants will learn new skills from Trestle trained specialists and explo.....Read more

Trestle School of Drama | February Half Term Workshop

Thu 21 Feb to Mon 21 Oct 2019 (8 months)

Trestle School of Drama | February Half Term Workshop

Trestle’s Adventures in Wonderland 21st February 2019, 10am-3pm | For ages 7-16 (Optional early drop off from 9am) This February Half Term Trestle will be creating their very own version of ‘Alice in Wonderland’ in.....Read more

Face Front Theatre | It's My Move

Tue 01 Oct 2019

Face Front Theatre | It's My Move

Face Front Inclusive Theater presents It's My Move which is a show about the transition from school to adult life for young people with mild to moderate Learning disabilities/difficulties and their parent/carers. It a.....Read more

Fun Palace 2019

Sun 06 Oct 2019

Fun Palace 2019

FREE EVENT Trestle Theatre Company in partnership with St Albans Museum + Gallery and St Albans Central Library will join hundreds of Fun Palaces nationally and internationally set to explode with free and fun activit.....Read more

Bait Theatre | Kill The Princess

Fri 11 Oct 2019

Bait Theatre | Kill The Princess

What happens when the glass slipper doesn’t fit? Is it time to put a bullet in the princess’ head? In a savagely playful subversion of identity, Lecoq/LISPA-trained clowns, poets and storytellers Lizzy Shakespeare an.....Read more

Pursued By A Bear | Nothing On Earth

Fri 18 Oct 2019

Pursued By A Bear | Nothing On Earth

All Tickets £5 by Anna Reynolds Directed by Rosamunde Hutt Music by Helen Chadwick An out-of-this world comedy inspired by female heroism, from the everyday to the extraordinary. Rhea is the teacher terrified .....Read more

Trestle/Small Nose | Rachel

Thu 24 Oct 2019

Trestle/Small Nose | Rachel

Thursday 24 October, 1.30pm (Schools performance) & 7.30pm Schools Tickets: £10 (1 teacher FREE for every 10 student tickets purchased) Evening performance: £12, £10 Concessions, £40 (group of 4) Suitable for ages 11+.....Read more

Paines Plough | I Wanna Be yours

Fri 01 Nov 2019

Paines Plough | I Wanna Be yours

Friday 1 November, 7.30pm Tickets: £12 Full, £10 All Concessions, £40 (Group of 4), £5 Under 30s (Limited Tickets available) I move clockwise. You move counter clockwise. In the middle we meet. We kiss. Ella is f.....Read more

Trestle School of Drama | October Half Term Workshop 2019

Tue 29 to Wed 30 Oct 2019 (2 days)

Trestle School of Drama | October Half Term Workshop 2019

Costs: £30 pp per day (Early drop off from 9am - £5pp) This October Half Term Trestle will be running 2 unique day long projects packed full of drama and games for ages 4-7 and 8-14. Participants will spend the day le.....Read more

CPD Training | Mask, Advanced and Intermediate Mask and Physical

Mon 21 to Wed 23 Oct 2019 (3 days)

CPD Training | Mask, Advanced and Intermediate Mask and Physical

Trestle’s CPD courses for drama teachers, professional practitioners and workshop leaders provide a unique opportunity to develop teaching and performance skills in mask, half mask and physical theatre, as well as discov.....Read more