Last active
July 31, 2017 09:08
-
-
Save pulading1988/6814c0f8db0bcd442715e849a946f4f0 to your computer and use it in GitHub Desktop.
查找substr在字符串str的第一个出现的位置
This file contains hidden or 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> SELECT LOCATE('bar', 'foobarbar'); | |
+---------------------------------------------------------+ | |
| LOCATE('bar', 'foobarbar') | | |
+---------------------------------------------------------+ | |
| 4 | | |
+---------------------------------------------------------+ | |
1 row in set (0.00 sec) |
This file contains hidden or 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
$specials = $specials->whereRaw("locate($display_area, display_area) > 0"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment