MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: HTML form based interactive SQL query



******    message to minivend-users from Mariusz Matuszewski <MMatuszewski@PL.EEFT.COM>     ******

THNX Dan!!!
It is working fine. The only problem I have now are the empty strings.
If you liwe the empty string in select, supposing that you are doing search
basing on two fields, my query looks like:
select code from products where author like '%%' and title like '%%';
If both select variables are not empty, everything works fine.
But I want to be able to leave some fields emty, to allow users selecting
just the categories they want like:
select code from products where author like '%%' and title like '%Album%';
Any ideas???

Mariusz Matuszewski
mmatuszewski@pl.eeft.com



-----Original Message-----
From: Dan Busarow [mailto:dan@dpcsys.com]
Sent: Monday, March 15, 1999 5:38 PM
To: minivend-users@minivend.com
Subject: RE: HTML form based interactive SQL query


******    message to minivend-users from Dan Busarow <dan@dpcsys.com>
******

On Mon, 15 Mar 1999, Mariusz Matuszewski wrote:
> Hello Dan!!!
> I really appreciate your help.
> But unfortunatelly it is not solving my problems.
> Can you do it from html drop down list.
> It is working fine for me to, for the user input field.
> But if I want to limit the number of user choices by allowing them just to
> select from the HTML drop-down-list it is not working.
> I did the ODBC trace (I  am connected to my database via ODBC) and the
query
> geneated by mvend to my SQL database is like:
> select * from products where author like ;
> so the result of drop down list (default selected) is not transferred as a
> parameter to the SQL query.
> Am I missin somethig really simple???

Did you name your <SELECT NAME="mv_searchspec"> ??

Also, if you are using a selection list you should consider using
= instead of LIKE.  Don't specify mv_substring_match if = will work.
For large tables it will a lot faster.

Dan

> -----Original Message-----
> From: Dan Busarow [mailto:dan@dpcsys.com]
> Sent: Sunday, March 07, 1999 10:36 PM
> To: Mariusz Matuszewski
> Cc: MiniVend List
> Subject: Re: HTML form based interactive SQL query
> 
> 
> ******    message to minivend-users from Dan Busarow <dan@dpcsys.com>
> ******
> 
> On Fri, 5 Mar 1999, Mariusz Matuszewski wrote:
> > I would like to make a form-based query to my SQL database.
> > For example:
> > how to send the following query to be sent to my database (the
> > form_field_artist is the user input field on the form):
> > select code from products where artist like form_field_artist
> 
>     <FORM ACTION="[process-target main]" METHOD=POST>
>     <INPUT TYPE="hidden" NAME="mv_search_file" VALUE="products">
>     <INPUT TYPE="hidden" NAME="mv_search_field" VALUE="artist">
>     <INPUT TYPE="hidden" NAME="mv_substring_match" VALUE="yes">
>     <INPUT TYPE="hidden" NAME="mv_searchtype" VALUE="sql">
>     <INPUT TYPE=text NAME="mv_searchspec" SIZE=20>
>        This is your form_field_artist
> 
>     <INPUT TYPE="submit" NAME="mv_todo" VALUE="Search">
>     <INPUT TYPE="hidden" NAME="mv_doit" VALUE="search">
> 
> mv_substring_match enables LIKE, without it the search uses =

-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: