"Pascal Van Hecke" <[EMAIL PROTECTED]> wrote:

> Hello Henri, Piotras,
> 
> It surely is possible to store any table as Midgard topics or articles with
> parameters, but if I read Andrey's requirements...
> 
> "The client wants to put and then weekly update her price-list on the
> site. The list, in its hard-copy version, is a table with the
> following columns: car's model name, its manufacture date, and price.

Even if it is csv file it may be updated automagically. 
 
> On the web, it's planned that a price-list position may have a photo
> attached to it. Also, it should be possible for a visitor to filter
> the list on the price or model name column."

That's why there were prpoposals for array type sort with mgd_list_topic_articles.
 
> ... I'm wondering how you filter or sort on price when you store the price
> field as a article/topic parameter?  Or perform a bulk update (such as
> "convert the prices to Euro").  Load the entire car list in an array and
> then sort/filter/update-one-by-one?  What then if you get thousands of
> articles? (it may not be here the case, so if it's only some tens of cars,
> storing it in Midgard might be a good solution indeed)
> It just seemed more easy to me to create a separate table for it, so you can
> use simple sql statements to perform these typical db tasks.

not at all 
Look for my good working (I hope) example.
(all in all I think it is better than storing data in another db)

article:
name is product name or special ID from financial database (in case You want
 these two db "talk" to each other)

foto is attachments (no comments for that I think)

extra1 and 2 and 3 for three prices types
special price, normal, very low one for special customers

type is used for specific options like:
- it is in price list
- archive
- show only for special customers if logged in 
- etc etc

types are made from prime numbers and its multiplication so that way 
You may have plenty of types very well controlled, and use

$car  = mgd_list_topic_articles($id);

while ($car && $car->fetch()) 
         {
                if ( bcmod ($car->type, $special_type)
                {
                blah blah 
                }
        } 


Product information could be stored in content or abstract to keep all information
in one place. Besides for future "product cpomparison" it should be faster to ereg
$article->content that list 30 parameters for 30 articles.


Customer may have financial data in txt file, sql database, Jet database, whatever. 
You may simple update midgard db automagically even 100 times a day.


Piotras

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to