[ic] Search out from a form

Interchange User interchange-users@icdevgroup.org
Wed Jul 2 12:34:01 EDT 2003

On Wednesday, July 2, 2003, at 11:17  AM, Olav Krapp wrote:

> Hi,
> can somebody help me, please? I´d like to execute a SQL-Query
> (small_search_box from the Foundation Catalog)
> out of a form, but I don´t know how. I tried it for 2 days now and my
> searches in the documentation ended without result.
> Here is my query:
> select * from products where (sku like '%9000%'
> or description like '%9000%'
> or prod_group like '%9000%'
> or category like '%9000%')
> and not product_filter = 'b2b'
> order by category;
> Please consider that 9000 is the value which is entered to the textbox 
> by
> the user.
> product_filter is a created field. The values for this field can be 
> b2b, b2c
> or all.
> The listed SQL-Query works for sure in mySQL.

You could try

			sql="select * from products where (sku like '%[cgi mv_searchspec]%'
				or description like '%[cgi mv_searchspec]%'
				or prod_group like '%[cgi mv_searchspec]%'
				or category like '%[cgi mv_searchspec]%')
				and not product_filter = 'b2b'
				order by category"
			[sql-param first_column], [sql-param second_column], [sql-param 
etc_column] <br>


More information about the interchange-users mailing list