MiniVend Akopia Services

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

Re: [mv] Searching multiple columns in MySQL problem



This is just straight cgi...I know how to do this. I need to know how to do this with minivend tags, so minivend parses the results via results.html...I appreciate the try, though. :)

Adam Goodman wrote:

> ******    message to minivend-users from Adam Goodman <adam@metalogica.com>     ******
>
> At 01:18 PM 10/20/1999 -0700, you wrote:
> >******    message to minivend-users from Daniel Ceregatti
> ><daniel@digitalsavant.com>     ******
> >
> >Ok, this isn't working for me either. What I want to do is create 1 (one)
> >text box that will search 3 different columns in the MySQL table. The
> >example shows how to search 3 columns, but with 3 text boxes. I've tried a
> >few variations, but have failed miserably. Can anyone demonstrate this?
> >
> >Dan Busarow wrote:
> >
> > > On Tue, 19 Oct 1999, Daniel Ceregatti wrote:
> > > > CGI is escaping the %'s, since these appear in the MySQL logs...the
> > first set reads: '% word_that_was_searched_for %', whereas the two
> > subsequent ones read: '% %'. As far as the <input...> tag, if type= is
> > not specified, it defaults to text.
> > >
> > > You need to tell minivend that there are three search terms.  See
> > > "Coordinated and joined searching" in the reference manual.
> > >
> > > Dan
> > > --
> > >  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
>
> HTML part
>
> <form action=your_cgi_prog.cgi>
> <input type=text name=form_field1>
> <input type=text name=form_field2>
> <input type=text name=form_field3>
> <input type=submit value="Go baba">
> </form>
>
> PERL script part (CGI)
>
> #!/usr/local/bin/perl
> use CGI
> $CGI = new CGI;
>
> use DBI;
>
> # the connect statement
>
> # get CGI stuff
> #...
> #...
>
> $QUERY = "SELECT table1.col1,table2.col2,table3.col3 from TABLENAME WHERE
> table1.$form_field1,table2.$form_field2,table3.$form_field3";
> # execute query
> $dbh = ...
>
> # take result and print it or something.
>
> Hope this helps, I didn't check it but this is the gist of it. if you need
> more then this let me know.
>
>         --  Metalogica Inc. - Virtual & Dedicated web servers
>         --  http://metalogica.com
> -
> 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

--

Daniel Ceregatti

Programmer - Digital Savant

Phone: (323) 848-7964 x106
Fax: (323) 871-2499
7039 Sunset Blvd., Suite 200
Hollywood, CA 90028





Search for: Match: Format: Sort by: