Re: MDB2 and Data Type Abstraction
| From: | Justin Patrin | Date: | Tue, 04 May 2004 22:26:06 +0000 |
| Subject: | Re: MDB2 and Data Type Abstraction | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28793@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
I can find nearly no useful tutorials or example for MDB2 (MDB as well). There are some docs, but the docs linked from the MDB2 PEAR page seem to be missing a lot, such as MDB2_Driver_Common, and the query, prepare, and execute methods. I had to look at the new API reference section or the source to fins anything useful. That being said, on to my questions.Ok, I guess I must have missed the MDB docs. I'm looking through them now, but I would still like answers to my questions.
Basically, I was looking for some kind of automatic datatype abstraction. In other words, I've created an XML schema for my DB, which creates it for me. I like that. But now that I want to query, that all seems to go away. To get the types back correctly (date conversions, etc) I have to specify the types in the call...even though I already specified it for the table in the XML file. Basically what I'm looking for is to specify a table, give an assoc array of values, and have my record inserted or updated. This is part of what DB_DataObject does, but I'm looking for something a bit simpler. Another question as well, as I'll probably have to implement some of this myself. Is there any way to tell MDB to read in the XML file into a useful format in PHP that I could use? (Akin to DB_DataObject's config array.)-- paperCrane <Justin Patrin>