CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Search any combination of search words

Print topic Send  topic

Author Message
NewbieRob
Posted: 10/07/2003, 4:59 PM

How can I tweak a search page so that it will search a description field for any combination of words in the search field? The basic search page is generated and works but only for the exact string entered, not for any combination of the words.

The GotoCode article, "Highlight Search Results" presents some code but the author says it should be inserted into a CodeCharge event that doesn't exist in my version, 2.1. Any ideas? I would think this capability would be great for any search page.
ryan
Posted: 10/08/2003, 12:27 AM

I am visualizing your page like a movie database....

searchbox [the usual suspects]
[searchbutton]

result----------------
1-----------the usual suspects
2-----------the usual thing

searchbox [message in]
[searchbutton]

result----------------
1-----------message in a bottle
2-----------message in a cellphone

With SQL server you can enable the FULL TEXT SEARCH so any combination of words is possible

Your post 'aims two birds' search for a word combo and highlight search results. Am I right?

In your data source SQL you can use something like

SELECT *
FROM Article
WHERE Subject LIKE '%{s_Subject}%' AND ForumID = {ForumID}
ORDER BY [Position]

But rely on the table first this is a CC SQL generated already.

Next is the highlighted result usually on GRID you can
change a label's appearance on BEFORE SHOW EVENT.

Function Phrase_Article_ID_BeforeShow() 'Article_ID_BeforeShow @18-5CF986EC

'Custom Code @20-73254650
' -------------------------
' Write your own code here.
'<span style="background-color: yellow;">some text</span>
IF yourformName.labelingrid.value = CCGetParam("searchphrase") THEN
yourformName.labelingrid.value = "<span style=""background-color: " & _
"yellow;"">" & _
yourformName.labelingrid.value & _
"<span>"
END IF
'change output in CC to HTML
' -------------------------
End Function

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.