PHP and MySQL Full Text Search Problem
| From: | Charles Kline | Date: | Fri, 14 Mar 2003 06:39:53 +0000 |
| Subject: | PHP and MySQL Full Text Search Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-139670@lists.php.net to get a copy of this message | ||
Hi all,
My first try at MySQL Full Text Search and it is not behaving ;)
Here is what I have for my query string:
$sql = "SELECT id, concat(fname, ' ', lname, ' ', degree1) as name".
" FROM tbl_personnel WHERE MATCH (fname,lname) AGAINST ('" .
$attributes['searchstring'] . "')";
This works pretty good. The only problem is it only works if there is an exact match for either the first name (fname) or last name. For example. In tbl_personnel there are 5 people with the first name Christine.
If I pass Chris to this query in $attributes['searchstring'] I get 0 results. If I pass Christine I get all 5.
What do I need to modify to make this work?
Thanks,
Charles