[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] SQL backed site exclusively??
****** message to minivend-users from Mark Stosberg <mark@summersault.com> ******
> What exactly needs to be defined in the catalog.cfg to run a "database"
>
> >> Database arbitrary arbitrary.asc dbi:mSQL:minivend:localhost:1114
>
> I gather this makes a "Database" (table) from the fields delimited in the
> arbitrary.asc file that is in the products directory?
Yes, this does make the database based on the fields delimited in
arbitrary.asc file in the products directory. It uses the first field as
the primary key, and the rest of fields as this default field type
(probaby char(128), unless you have specified the field type explicity
in catalog.cfg. It does _not_ write definitions anywhere for you. I'm
using MV 4 with Postgres so I can show what my catalog looks like, and
you can see if you can make it work with MySQL and MV 3. My basic
products table definition is included below:
<paste>
Database products products.tab dbi:Pg:dbname=music;host=foo.server.com;port=5432
Database products USER stanley
Database products NUMERIC id,seller_id,cat_id,price
Database products KEY id
Database products COLUMN_DEF id=serial
Database products COLUMN_DEF seller_id=int4
Database products COLUMN_DEF cat_id=int4
Database products COLUMN_DEF description=text
Database products COLUMN_DEF price=float
Database products COLUMN_DEF condition=char(4)
Database products COLUMN_DEF sold=bool not null default 'f'
Database products COLUMN_DEF title=varchar(64)
Database products COLUMN_DEF author=varchar(64)
Database products COLUMN_DEF ensemble=varchar(32)
Database products COLUMN_DEF maker=varchar(64)
</paste>
Notice that MySQL will have a different DSN connect string, and that
you'll have a different username. Also, these are not the standard
products fields, they are my own. Also note that I don't think MySQL has
a "serial" field. You should use "AutoIncrement" or whatever you need
there.
The products.tab file should have a single line with the tab
deliminated field names like
id seller cat_id description etc....
So far I can't get the search engine to do what I want-- To make a
results page with the handy minivend tags but based on a SQL query
rather than the all the minivend search tags. So in my first store, I'm
writing the search engines in custom Perl and SQL, which probably runs
quicker without the minivend layer, and is easier to debug. I'm still
using Minivend for session management, the flycat page and the
checkout/order system.
-mark
<<-------------------------------------------------------------->>
personal website < Summersault Website Design
http://mark.stosberg.com/ > http://www.summersault.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