Last active
June 30, 2021 15:19
-
-
Save kartick14/fcaba1c82cc44eb9aeabb6268b1504b7 to your computer and use it in GitHub Desktop.
MySQL find exact substring from a string on DB table
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
$regxp = 'River'; | |
$sql = "SELECT * FROM categories where catinclude RLIKE '(^|,)$regxp(,|\$)'"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment