 |
 |
 |
 |
 |
| Author |
Message |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
One minor improvement for search.php |
|
This:
array("short =~ %$search%", 'or', "full =~ %$search%"))) as $row){
Should be:
array("short =~ %\b$search\b%", 'or', "full =~ %\b$search%\b"))) as $row){
Have to put in word boundries or the search will return a lot of junk. WARNING: This only works using txtSQL database and will not work with mySQL.
Last edited by BadDog on Mon Nov 28, 2005 1:47 pm; edited 1 time in total |
|
| Sat Nov 26, 2005 1:23 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Thrik
Joined: 26 Oct 2005 Posts: 50
|
|
|
|
That doesn't seem to have done a thing for me. If I search for 'o' with that change in place I will still get hundreds of results returned. Another slight annoyance I'm noticing is that if I do a multiword search, it won't return anything at all (even if I put 'king kong' and there is definitely 'king kong' in a number of my results). 
|
|
| Sun Nov 27, 2005 6:35 pm |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
Are you by chance usingh mySQL?
|
|
| Sun Nov 27, 2005 10:23 pm |
|
 |
Thrik
Joined: 26 Oct 2005 Posts: 50
|
|
|
|
I am.
|
|
| Mon Nov 28, 2005 4:50 am |
|
 |
BadDog
Joined: 21 Nov 2005 Posts: 62
|
|
|
|
 |  | I am. |
Ok, I made big mistake by not saying that %\b only works using txtSQL 
|
|
| Mon Nov 28, 2005 1:45 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|