Akopia Akopia Services

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

Re: [mv] How does minivend know which table to use



******    message to minivend-users from "Christopher P. Lindsey" <lindsey@mallorn.com>     ******

> > However, for the life of me I can't work out how minivend knows which
> > table in the database to use.
> 
>    I struggled with this for a while too.  It turns out that you need
>    to name the database whatever your table is called.  For example,
>    in my case the table is called 'plant', so I have a line like this:
> 
>       Database   products   plant.asc  dbi:mysql:heronswood:mysql:3306

I should mention something else that I just discovered.  No matter how
hard you try, the search engine will not search this table -- you'll
consistently get back errors like

   host.example.com gNLryPdF:example.com - [21/January/2000:01:12:10 -0600] heronswood /cgi-bin/catalog/search Runtime error: Table 'heronswood.products' doesn't exist at /home/minivend/lib/Vend/Table/DBI.pm line 379.

If you try to specify a table with mv_search_file, it just doesn't know
what database to try:

   host.example.com gNLryPdF:example.com - [21/January/2000:01:46:54 -0600] heronswood /cgi-bin/catalog/search non-existent database 'plant'

Of course, the table does exist and is happily used by other parts of the
catalog, but you need to fake it.  I ended up creating *another* database
with exactly the same parameters as my products database, but calling
it plant:

   Database   plant      plant.asc  dbi:mysql:heronswood:mysql:3306

*Everything* else is exactly the same -- the username, password, etc.
for authentication, COLUMN_DEF, *everything.*

This is not optimal by any means, but it should get you running.  Anyhow,
you'll still need to set mv_search_file to the name of the table to
search.  

Chris
-
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: