MySQL full text search equivalents to Google search: Difference between revisions
Jump to navigation
Jump to search
MySQL full text search equivalents to Google search (edit)
Revision as of 22:17, 4 June 2021
, 4 June 2021→MySQL approach
m (Planetoid moved page MySQL full text Search equivalents to Google search to MySQL full text search equivalents to Google search) |
|||
| Line 58: | Line 58: | ||
=== MySQL approach === | === MySQL approach === | ||
==== SQL syntax ==== | |||
Input search keywords, and returned the the first occurrence of matched paragraph. Using MySQL [http://www.w3resource.com/mysql/string-functions/mysql-substring-function.php SUBSTRING() function], [http://www.w3resource.com/mysql/string-functions/mysql-position-function.php POSITION() function] & [http://www.w3resource.com/mysql/string-functions/mysql-char_length-function.php CHAR_LENGTH() function]. | Input search keywords, and returned the the first occurrence of matched paragraph. Using MySQL [http://www.w3resource.com/mysql/string-functions/mysql-substring-function.php SUBSTRING() function], [http://www.w3resource.com/mysql/string-functions/mysql-position-function.php POSITION() function] & [http://www.w3resource.com/mysql/string-functions/mysql-char_length-function.php CHAR_LENGTH() function]. | ||
| Line 87: | Line 88: | ||
</pre> | </pre> | ||
Run on [http://sqlfiddle.com/#!9/096df3/5/0 sqlfiddle] | |||
Instructions | |||
==== Instructions ==== | |||
(1) [https://www.w3resource.com/mysql/string-functions/mysql-position-function.php MySQL POSITION() function - w3resource] "MySQL POSITION() returns the position of a substring within a string." | (1) [https://www.w3resource.com/mysql/string-functions/mysql-position-function.php MySQL POSITION() function - w3resource] "MySQL POSITION() returns the position of a substring within a string." | ||
<pre> | <pre> | ||