Title / Description
Code CREATE USER 'replicant'@'%' IDENTIFIED BY 'slavepass'; GRANT REPLICATION SLAVE ON *.* TO 'replicant'@'%'; SELECT 'mediaid' AS `idtype`, `m`.`mediaid` AS `id`, `m`.`title` AS `title`, `m`.`description` AS `description`, `m`.`source` AS `source`, `m`.`date` AS `startdate`, `m`.`date` AS `enddate`, `c`.`class` AS `class`, `c`.`classname` AS `classname`, `per`.`firstname` AS `firstname`, `per`.`lastname` AS `lastname`, `c`.`description` AS `classdesc`, `p`.`programid` AS `programid`, If((`p`.`subprogramof` IS NOT NULL),`mp`.`programname`, `p`.`programname`) AS `programname`, 'Recorded' AS `longname` FROM ((((((((`media` `m` JOIN `mediaaudience` `ma` ON (((`m`.`mediaid` = `ma`.`mediaid`) AND (`ma`.`audiencetype` = 'Public') AND ((`ma`.`enddate` < Now()) OR Isnull(`ma`.`enddate`))))) LEFT JOIN `mediapresenter` `mpp` ON ((`m`.`mediaid` = `mpp`.`mediaid`))) LEFT JOIN `person` `per` ON ((`mpp`.`personid` = `per`.`personid`))) LEFT JOIN `mediaaudience` `mad` ON (((`ma`.`mediaid` = `mad`.`mediaid`) AND (`mad`.`audiencetype` = 'classid')))) LEFT JOIN `class` `c` ON ((`mad`.`audienceid` = `c`.`classid`))) LEFT JOIN `program_class` `pc` ON ((`c`.`classid` = `pc`.`classid`))) LEFT JOIN `program` `p` ON ((`pc`.`programid` = `p`.`programid`))) LEFT JOIN `program` `mp` ON ((`p`.`subprogramof` = `mp`.`programid`))) UNION SELECT 'sectionid' AS `idtype`, `cc`.`sectionid` AS `id`, `cc`.`title` AS `title`, `cc`.`description` AS `description`, `l`.`mapurl` AS `mapurl`, `cc`.`starttime` AS `startdate`, `cc`.`endtime` AS `enddate`, `c`.`class` AS `class`, `c`.`classname` AS `classname`, `per`.`firstname` AS `firstname`, `per`.`lastname` AS `lastname`, `c`.`description` AS `classdesc`, `p`.`programid` AS `programid`, If((`p`.`subprogramof` IS NOT NULL),`mp`.`programname`, `p`.`programname`) AS `programname`, `d`.`longname` AS `longname` FROM ((((((((`calendarcache` `cc` JOIN `section` `s` ON ((`cc`.`sectionid` = `s`.`sectionid`))) LEFT JOIN `person` `per` ON ((`s`.`teacherid` = `per`.`personid`))) LEFT JOIN `division` `d` ON ((`s`.`divisionid` = `d`.`divisionid`))) LEFT JOIN `location` `l` ON ((`s`.`locationid` = `l`.`locationid`))) LEFT JOIN `class` `c` ON ((`s`.`classid` = `c`.`classid`))) LEFT JOIN `program_class` `pc` ON ((`c`.`classid` = `pc`.`classid`))) LEFT JOIN `program` `p` ON ((`pc`.`programid` = `p`.`programid`))) LEFT JOIN `program` `mp` ON ((`p`.`subprogramof` = `mp`.`programid`))) WHERE (NOT ((`cc`.`description` LIKE '%{cs}%'))) if x <> 1 then null; end if;
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code