Searching the Exact Phrase in Mysql

Codes here !

Moderators: macek, egami, gesf

Post Reply
User avatar
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Searching the Exact Phrase in Mysql

Post by egami » Tue Apr 16, 2013 1:27 pm

by default, SQL already searches via exact phrase.


$a = "This helps me a lot"

$query = "SELECT * FROM myTable WHERE value='$a'"

Will look for anything that contains "This helps me a lot" (Depending on your table setup, this may or may not be case sensitive so be wise).

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests