Article View: comp.soft-sys.powerbuilder
Article #46Re: Title Search??
From: royle
Date: Fri, 02 Oct 1998 00:00
Date: Fri, 02 Oct 1998 00:00
65 lines
2573 bytes
2573 bytes
Well, you can always do a search for ' ' + word + ' ', but that won't catch words at the end or beginning of the sentence. You could write an explode() function and filter the things through that. An explode() function takes a string and turns it into an array based on a delimiter, so given a string suchas "The PowerBuilder for DOS", if you did: explode( my_string, " ", my_array ) my_array would wind up with: "The", "PowerBuilder", "for", "DOS" At which point you could search the array for what you want. -Matt jayvee@mayon.cats.edu.ph wrote: > I would like to ask some hints about SEARCHING... > This is about Library Management System. > > Let's say I have the following in titles in the database: > > 1 "The PowerBuilder for DOS" > 2 "An Introduction to Database and SQL" > 3 "Advance Newbie" > 4 "Accelerate into C++ Programming" > 5 "C++ for Dummies" > > When the user search for: > > "PowerBuilder" Displays(1) > "SQ" No result > "SQL" Displays(2) > "C++" Displays(4,5) > > (Also I will be filtering : A, An, The, Is, For, blah blah.. To get > only the root word) > > I don't think I can achive this with that set of data. I'm planing to > add another table to store the choped version of the title. > > Something like this: > > 1:PowerBuuilder > 1:Dos > 2:Introduction > 2:Database > 2:SQL > 3:Advance > 3:Newbie > 4:Accelerate > 4:C++ > 4:Programming > 5:C++ > 5:Dummies > > With this I can do an IN clause or a series of AND blah.. AND blah... > > Is this OK?? Or I'm getting into confusion. Please put me into > the right path... Or maybe give me some link about this topic. > > Thank you very much. > > (please respond by e-mail) > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<3614D529.85A4421E@3k3k.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6v1ti4$a8g$1@nnrp1.dejanews.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10288e,92b5b71610a48eeb X-Google-Attributes: gid10288e,public X-Google-Thread: 111366,92b5b71610a48eeb X-Google-Attributes: gid111366,public From: royle@3k3k.org Subject: Re: Title Search?? Date: 1998/10/02 Message-ID: <3614D529.85A4421E@3k3k.org> X-Deja-AN: 397032393 Content-Transfer-Encoding: 7bit References: <6v1ti4$a8g$1@nnrp1.dejanews.com> X-Accept-Language: en X-Server-Date: 2 Oct 1998 13:31:24 GMT Content-Type: text/plain; charset=us-ascii Organization: (remove a '3k' to send me mail) Mime-Version: 1.0 Newsgroups: comp.soft-sys.powerbuilder,borland.public.cppbuilder.database