CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 haveing a search coming from 3 records from 1 text box

Print topic Send  topic

Author Message
troy
Posted: 01/15/2006, 10:09 PM

hi there:

i was wondering if there was a way of searching 3 records from a table from 1 search text box.

in summary.

i have a grid with a search attached, and have a search text box which brings up a name from 1 record in database.

in the admin record form i have the choice of adding this name into 1 of 3 text boxs.
the thing is that when i search a name (by keyword) it only brings up just 1 text box search, that is because i connected that to only one text box in the admin record form,
So i am trying to get search results from all the 3 text boxes in the record form, because the user can choose any one of the 3 text boxes to put the data in.

so what im saying is can i bring up all search results from the 3 text boxes in the record form from 1 keyword text box in the search form attached to the grid.

using, PHP,MYSQL,CCS3

regards Troy
Walter Kempees
Posted: 01/16/2006, 12:35 AM

Troy,

If I understand your question right you want 1 search text box to find all
records within ONE table that have the search value in field1 OR field2 OR
field3.

Method 1:
Changing the Page you already have:
Open the page, select the Properties of the Grid.
Press the elipses [...] of the Data Source bringing up the
VisualQueryBuilder.
On the left of the VQB you see your complete SQL statement.
Click the WHERE and in the bottom right half you will see someting like:
field1 s_keyword
There you can create 2 more where clauses almost exactly as the first (open
the first to see the settings.)

All conditions should be set to OR.
When all three are in that space, select them all three (shift-click) and
press the () button to create
( field1 like '%{s_keyword}%' OR ( field1 like '%{s_keyword}%' OR ( field1
like '%{s_keyword}%' )

Method 2
When using the builder : from the Available fields choose all fields to be
searched ( all 3 fields (or all (text) fields for that matter) )
Search Builder step 2 of 4 press the Advanced button and set the desired
Search Type:
<b>Create a sigle search field and use OR condition.</b>

Hope this helps.

"troy" <troy@forum.codecharge> schreef in bericht
news:243cb3897e13de@news.codecharge.com...
> hi there:
>
> i was wondering if there was a way of searching 3 records from a table
> from 1
> search text box.
>
> in summary.
>
> i have a grid with a search attached, and have a search text box which
> brings
> up a name from 1 record in database.
>
> in the admin record form i have the choice of adding this name into 1 of 3
> text
> boxs.
> the thing is that when i search a name (by keyword) it only brings up just
> 1
> text box search, that is because i connected that to only one text box in
> the
> admin record form,
> So i am trying to get search results from all the 3 text boxes in the
> record
> form, because the user can choose any one of the 3 text boxes to put the
> data
> in.
>
> so what im saying is can i bring up all search results from the 3 text
> boxes in
> the record form from 1 keyword text box in the search form attached to the
> grid.
>
> using, PHP,MYSQL,CCS3
>
> regards Troy
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

troy
Posted: 01/16/2006, 1:32 AM

thanks very much Walter

yes that did the trick,

i was using the AND not the OR

thanks very much for your help Walter


cheers
kind regards
Troy

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.