CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Search using list box and text box

Print topic Send  topic

Author Message
dazed_o1o
Posted: 07/20/2002, 7:47 AM

I'm trying to create a search form where the user can select the db column
to search in a list box and a text box for the keyword to search for. I have
named the list box s_column and the text box s_keyword. I have configured my
grid's data source as follows (using SQL as the source type):
SELECT <column names>
FROM <table>
WHERE '{s_COLUMN}' LIKE '%{s_KEYWORD}%'
ORDER BY <column name>

with the following parameters:
s_Column = s_Column
type text URL
s_keyword = s_keyword
type text URL

When I open the grid with no search criteria all the data is shown as
expected, but if I try to do a search I get no records returned. Can someone
point out my configuration error? Also, the columns I'm trying to search
from include types Text, Date and Integer.

TIA

Geert van der Ploeg
Posted: 07/20/2002, 3:07 PM

I'm not sure, but putting the {s_COLUMN} between quotes in your query, maybe
makes the database see it like a string.

So, one string (your column name) will be compared with another string (your
keyword).


Again: it's just a suggestion, I'm not sure this is the problem.

HTH,

Geert van der Ploeg


"dazed_o1o" <dazed_o1o@yahoo.com> wrote in message
news:ahbt58$pc6$1@news.codecharge.com...
> I'm trying to create a search form where the user can select the db column
> to search in a list box and a text box for the keyword to search for. I
have
> named the list box s_column and the text box s_keyword. I have configured
my
> grid's data source as follows (using SQL as the source type):
> SELECT <column names>
> FROM <table>
> WHERE '{s_COLUMN}' LIKE '%{s_KEYWORD}%'
> ORDER BY <column name>
>
> with the following parameters:
> s_Column = s_Column
> type text URL
> s_keyword = s_keyword
> type text URL
>
> When I open the grid with no search criteria all the data is shown as
> expected, but if I try to do a search I get no records returned. Can
someone
> point out my configuration error? Also, the columns I'm trying to search
> from include types Text, Date and Integer.
>
> TIA
>
>


   


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

Web Database

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.