Bedford CF-UK Message Board Logo [Home] [Search] [FAQ]
Bedford CF-UK Message Board > Comments to the Sysop > Strange search (non)results
[Private Message] [Register] [Profile] [Member list] [Log-in]
Who's Online:
There are 0 member(s), and 1 guest(s) online.
 
[Printable Version] [Post Reply]
Author Message
bluebedouin
Global Moderator
Posts : 2444
Location : Northampton,England.
Status    : Offline

Strange search (non)results

I needed to phone Ray Wild today about a starter motor but had lost his number.I remember I'd seen it posted & in fact had repeated it myself in a post.
Searching for his name showed no relevant results but searching the phone number area code (01327)resulted in six,all with his name in it!:?
Any ideas as to why it wouldn't/couldn't find him?

----------------------

Fri 14 Jan 2011 @ 21:08 View bluebedouin   Email bluebedouin   Edit this messageQuote this messagePMQuote this message
Colin Birch
Admin
Posts : 4273
Location : Pontypridd, South Wales
Status    : Offline

You've got me stumped. I've been playing around on my test forum with the same post and all sorts of combinations of the SQL query and failed but if you search for other two word strings from the same post it finds them. Looks like I've got a lot of de-bugging to do here

----------------------
Colin Birch - CF-UK Admin
Pontypridd, S.Wales
The Bedford CF Web Site
http://www.cf-uk.co.uk

Fri 14 Jan 2011 @ 22:16 View Colin Birch   Email Colin Birch   Colin Birch Home Page   Edit this messageQuote this messagePMQuote this message
bluebedouin
Global Moderator
Posts : 2444
Location : Northampton,England.
Status    : Offline

Colin Birch wrote:
... Looks like I've got a lot of de-bugging to do here

Did you know that a rough translation of bluebedouin in the sioux language is,"He who finds Colin lots of things to do"?

;D

----------------------

Fri 14 Jan 2011 @ 23:06 View bluebedouin   Email bluebedouin   Edit this messageQuote this messagePMQuote this message
Colin Birch
Admin
Posts : 4273
Location : Pontypridd, South Wales
Status    : Offline

Well, I've done it
It was down to the way that MySQL stores data in a 'blob' field. I assumed that doing the following

SELECT threadid FROM posts WHERE LOWER($what) LIKE $searchstring

would convert $what to lower case but it turns out that doesn't work on 'blob' fields as MySQL doesn't know what character set the field is stored in. I had to change the query to

SELECT threadid FROM posts WHERE LOWER(CONVERT($what USING latin1)) LIKE $searchstring

This tells MySQL that the field should be converted to lower case using the latin1 character set.

Simples!

----------------------
Colin Birch - CF-UK Admin
Pontypridd, S.Wales
The Bedford CF Web Site
http://www.cf-uk.co.uk

Fri 14 Jan 2011 @ 23:28 View Colin Birch   Email Colin Birch   Colin Birch Home Page   Edit this messageQuote this messagePMQuote this message
Anon
Deleted
Posts :
Location :
Status    : Offline

Im sure that some folk understand that Colin, but it goes to show what it takes to keep this mighty site going! I am in genuine awe- I understand the gist of it but still have no idea what what it really means! Keep up the good work!

----------------------

Sat 15 Jan 2011 @ 00:17 Edit this messageQuote this messagePMQuote this message
Time in GMT
[Post Reply]
New posts since your last visit Administrative Functions: Open/Close/Delete Thread / Move Thread
Old post

Forum Jump:

Back to the CF-UK Homepage ][ Email CF-UK

Powered by FunkBoard vCF0.74c