MySQL full text search equivalents to Google search

From LemonWiki共筆
Revision as of 16:04, 28 January 2015 by Planetoid (talk | contribs)
Jump to navigation Jump to search


Google search: keyword1 keyword2 same as keyword1 AND keyword2. Icon_exclaim.gif The following is exact words search.

  • MySQL: tags REGEXP '易筋經' AND tags REGEXP '吸星大法' (online demo)
  • MySQL: tags LIKE '%易筋經%' AND tags LIKE '%吸星大法%'
  • MySQL: tags LIKE '%易筋經%吸星大法%' AND tags LIKE '%吸星大法%易筋經%' Trivial for multiple keywords

Google search: keyword1 OR keyword2

  • MySQL: tags REGEXP '易筋經' OR tags REGEXP '吸星大法' (online demo)
  • MySQL: tags LIKE '%易筋經%' OR tags LIKE '%吸星大法%'

Google search: keyword1 NOT keyword2 same as keyword1 -keyword2

  • MySQL: tags REGEXP '易筋經' AND tags NOT REGEXP '吸星大法' (online demo)
  • MySQL: tags LIKE '%易筋經%' AND tags NOT LIKE '%吸星大法%'


related articles:

related news:

MySQL related news
Failed to load RSS feed from https://news.google.com.tw/news/feeds?pz=1&cf=all&ned=us&hl=en-US&q=mysql&cf=all&scoring=n&output=rss: Error parsing XML for RSS