Skip to content

Instantly share code, notes, and snippets.

@hailwood
Created February 2, 2015 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hailwood/ad167cfc1febda9a564b to your computer and use it in GitHub Desktop.
Save hailwood/ad167cfc1febda9a564b to your computer and use it in GitHub Desktop.
SELECT DISTINCT
COUNT(*)
FROM
`SiteTree_Live`
WHERE (
MATCH (
Title,
MenuTitle,
Content,
MetaDescription
) AGAINST ('About*' IN BOOLEAN MODE) + MATCH (
Title,
MenuTitle,
Content,
MetaDescription
) AGAINST ('About*' IN BOOLEAN MODE)
AND ShowInSearch <> 0
)
@hailwood
Copy link
Author

hailwood commented Feb 2, 2015

Export of row I am trying to match:

INSERT INTO `SiteTree_Live` (
  `ID`,
  `ClassName`,
  `Created`,
  `LastEdited`,
  `URLSegment`,
  `Title`,
  `MenuTitle`,
  `Content`,
  `MetaDescription`,
  `ExtraMeta`,
  `ShowInMenus`,
  `ShowInSearch`,
  `Sort`,
  `HasBrokenFile`,
  `HasBrokenLink`,
  `ReportClass`,
  `CanViewType`,
  `CanEditType`,
  `Version`,
  `ParentID`,
  `Priority`
) 
VALUES
  (
    '2',
    'Page',
    '2014-03-20 10:01:02',
    '2014-03-20 10:01:02',
    'about-us',
    'About Us',
    NULL,
    '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>',
    NULL,
    NULL,
    '1',
    '1',
    '2',
    '0',
    '0',
    NULL,
    'Inherit',
    'Inherit',
    '1',
    '0',
    NULL
  ) ;


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment