Created
July 26, 2013 03:42
-
-
Save ss23/6085972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT "SiteTree"."ClassName", "SiteTree"."Created", "SiteTree"."LastEdited", "EventPage"."StartTime", "EventPage"."EndTime", "EventPage"."Location", CASE WHEN "SiteTree"."ClassName" IN ('Page', 'IFramePage', 'ErrorPage', 'RedirectorPage', 'FooterHolder', 'HeaderHolder', 'VirtualPage', 'BaseHomePage', 'DatedUpdateHolder', 'EventHolder', 'NewsHolder', 'DatedUpdateHolderExtension', 'DatedUpdatePage', 'EventPage', 'NewsPage', 'SitemapPage', 'BookPage', 'StrategyPage', 'StrategyActionPage', 'StrategyGlossaryPage', 'StrategyHomePage', 'StrategySectionPage', 'StrategyDetailedSectionPage', 'StrategySectionIconPage', 'StrategyShiftPage', 'HomePage', 'UserDefinedForm') THEN "Page"."Abstract" WHEN "SiteTree"."ClassName" IN ('DatedUpdatePage', 'EventPage', 'NewsPage') THEN "DatedUpdatePage"."Abstract" ELSE NULL END AS "Abstract", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree"."Sort" | |
FROM "SiteTree" | |
LEFT JOIN "EventPage" ON "EventPage"."ID" = "SiteTree"."ID" | |
WHERE ("EventPage"."ID" = 2248) AND ("SiteTree"."ClassName" IN ('EventPage')) | |
ORDER BY "SiteTree"."Sort" ASC | |
LIMIT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> show create table Page; | |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| Table | Create Table | | |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| Page | CREATE TABLE `Page` ( | |
`ID` int(11) NOT NULL AUTO_INCREMENT, | |
`Abstract` mediumtext CHARACTER SET utf8, | |
`Archived` tinyint(1) unsigned NOT NULL DEFAULT '0', | |
`ImportedFromFileID` int(11) NOT NULL DEFAULT '0', | |
`RSSUpdateSort` int(11) NOT NULL DEFAULT '0', | |
PRIMARY KEY (`ID`), | |
KEY `ImportedFromFileID` (`ImportedFromFileID`) | |
) ENGINE=InnoDB AUTO_INCREMENT=2249 DEFAULT CHARSET=latin1 | | |
+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
1 row in set (0.02 sec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Silverstripe: | |
Unknown column 'Page.Abstract' in 'field list' | |
IN GET /admin/pages/edit/show/2250 | |
MySQL Client: | |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '."ClassName", "SiteTree"."Created", "SiteTree"."LastEdited", "EventPage"."StartT' at line 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment