Hello Pascal,

On Monday, December 2, 2002 at 5:15:31 PM you wrote:

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

PVH> Again, it 'll depend on Andrey's requirements what will be the right
PVH> solution for him.  I just wanted to make the point that I for myself try to
PVH> use Midgard for the content management and templating aspects of a web app,
PVH> whereas for data processing I find it more easy to create a separate data
PVH> structure and  use other existing frameworks in plain php.

Hmm... after all, I finally think I could put the data into a separate
table in the Midgard DB. I then could SELECT them the way I want to,
UPDATE , etc... And, if I got the idea right, I actually retain the
ability to repligard everything at once... thanks to the extendable DB
schema repligard uses.

I guess I could copy /usr/local/share/midgard/repligard.xml and add
something like the following to it:

<Schema xmlns="http://www.midgard-project.org/repligard/1.4";>
 ...blah-blah-blah...
  <type name="price">
    <field name="name" type="text"/>
    <field name="color" type="text"/>
    <field name="price" type="integer"/>
  </type>
</schema>

This way, AFAIK, repligard will replicate the whole DB structure
including my customised table... Am I right at this point?

And then I'd use the same schema to import the data on the live
server...

And returning to using PHP MySQL functionality, does Midgard provide a
MySQL connection object to use? Or should I establish my own
connection to the DB? I couldn't figure this one out... though.

Any suggestions, comments and ideas are welcome...

-- 
See you,
Andrey.


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

Reply via email to