MiniVend Akopia Services

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

SQL Searching Help!



Hello,
I have a search that works great with the text file, but I'm having an
extremely difficult time duplicating it using the SQL database (eliminating
the text file).
  <form action="http://christianbooks.com/shop/cb/process?;;CB2005"
method="POST">
           <input type="hidden" name="mv_doit" value="search">
           <input type="hidden" name="mv_search_field" value="category1">
           <input type="hidden" name="mv_search_field" value="category2">
           <input type="hidden" name="mv_search_field" value="category3">
           <input type="hidden" name="mv_search_field" value="category4">
           <input type="hidden" name="mv_search_field" value="title">
           <input type="hidden" name="mv_search_field" value="author">
           <input type="hidden" name="mv_search_field" value="comment">
           <input type="hidden" name="mv_search_field" value="covertype">
           <input type="hidden" name="mv_search_field" value="publisher">
           <input type="hidden" name="mv_matchlimit" value="10">
           <input type="hidden" name="mv_search_page" value="results">
           <small><b>Search:</b></small><select name="mv_searchspec">
           <option value="">All
           <option value="Book " selected>Books
           <option value="Music ">Music
           <option value="Video ">Videos
           <option value="Software ">Software
           <option value="AudioBook ">Audio Books
           <option value="Bible ">Bibles
           </select><input type="text" name="mv_searchspec" size="10">
           <input type="submit" name="submitsearch" value="Go" border="0">
 </form>

This implements 2 mv_search_spec's, one via a drop-down menu and another via
an input field, in order to narrow a search down to a specific category...

Can anyone provide help or clues on how to convert this to use the mySQL
data?

I have the mySQL database setup, my flypages are pulling off of the mySQL
data, and I have 1-Click searches running off the mySQL data. -Here are 2
examples:
<a href="[tag sql]SELECT code FROM products WHERE author LIKE '%[item-field
author]%' ORDER BY fulfiller[/tag]">[item-field author]</a>
<A HREF="[tag sql]SELECT code FROM products WHERE category1 = '[item-field
category3]' OR category2 = '[item-field category3]' OR category3 =
'[item-field category3]' OR category4 = '[item-field category3]' ORDER BY
fulfiller[/tag]">[item-field category3]</a>

These work great!  I've read the docs on mySQL searches, and tried some of
the form versions with no success.  I've installed SQL::Statment PERL
module, because the error.log file told me to :)

I've read this page
http://www.minivend.com/minivend/docindex/11.07.SQL_searches.html but it
seems to not address me in any way!

Thanks for your help!!

Russ Mann



Search for: Match: Format: Sort by: