CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 search parameter "how to" in custom SQL expression (php/MySQL)

Print topic Send  topic

Author Message
vivo


Posts: 3
Posted: 02/10/2004, 8:17 AM

i need to perform a full text search and have set up the table "abc" as required.

Now, i cannot figure out, just how the "s_searchtext" parameter needs to be enclosed, in order to be replaced with the url parameter supplied by search form, instead of being used literally.

This is my WHERE expression:
MATCH(field1, field2) AGAINST(***s_searchtext***).

When i have a look at the standard parameter editor and the resulting SQL strings, there is always some curly braces stuff, but i cannot find some doc that explains just what to do here...

Thanks.
View profile  Send private message
peterr


Posts: 5971
Posted: 02/10/2004, 11:45 AM

Just use the tag {s_searchtext} within your SQL, exactly as is, including the curly brackets {}. It will then be replaced by the URL parameter supplied by the search form. If you change "Table" to "SQL" then CCS is doing this automatically to show you how to use it, therefore do not change it. If you need to modify your SQL statement just like you did, then still keep {s_searchtext} unchanged.
In addition, you will need to click on the "+" in the Parameters section of the same Data Source dialog, and specify that the s_searchtext variable (used in your SQL) should be retrieved from the same s_searchtext URL parameter. Both "Variable" and "Parameter Source" should be the same, while Type of the parameter should be set to "URL".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
vivo


Posts: 3
Posted: 02/10/2004, 12:40 PM

Works perfectly well, thanks!

I did not quite understand the documentation in that place...
View profile  Send private message

Add new topic Subscribe to topic   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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