1 (edited by Datenbrei 2008-01-27 18:37)

Topic: Search fails without wildcards with sqlite

Hi there!

I'm pretty new to PunBB. I installed it on LAMPP for the use with sqlite and everything seems to work fine, but there seems to be an issue with searching: If I have an article "ALIX.1C by PC Engines" and I search for "ALIX" I get no results. If I search for "*ALIX*" it works. I think it should be possible to search just for a word without making use of wildcards. So I think this can be called a bug. I work as oracle database administrator and as far as I understand the search code, it could have to do with the SQL function "LIKE". In Oracle you have to make use of the "%" Wildcard ot get any result, if a field does not match totally. I don't really understand PHP and don't really know sqlite, so I'm a bit handicapped and possibly didn't understand all the code- just tried to do so.  smile

I use PunBB 1.2.16.

Re: Search fails without wildcards with sqlite

If the article you were looking for was titled "ALIX.1C" and you searched for "ALIX," I think it required the wildcard because it searched for ALIX without any additions (i.e. if you searched for "ALIX.1C" it probably would have worked, similarly if your article had was titled "ALIX 1.C by Pc Engines," - note the space between ALIZ and 1.C - it would have found it just fine when searching for "ALIX.")

I could be wrong, but I believe the search only looks for complete words, without anything added directly onto the word.

-Master Hob Bramble of Willowbottom

Pardon me, good sir, but it appears that your diving apparatus has a leak.
Perpetual Thursday | Alternative-Internet.com | hobbramble.deviantart.com

Re: Search fails without wildcards with sqlite

Right: If I search for whole words it works! Didn't know that. Thanks. :-)

Re: Search fails without wildcards with sqlite

Yeah, the wildcard is what you use to search for parts of words. If there's no wildcard, you're searching for the exact word. Makes sense wink
Moved to PunBB Discussion