Re: DB_DataObjects General Queries

From: Date: Thu, 10 Aug 2006 08:36:52 +0000
Subject: Re: DB_DataObjects General Queries
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24872@lists.php.net to get a copy of this message
Ian Warner wrote: > Hi > > Just some questions I have about this really. > > 1. At the moment we extend PEAR::DB - it seems it is possible to use > MDB2 - is this viable? Better? How do I make it DO use MDB2? there's an option db_driver = MDB2 > > 2. Prepared queries, can this be done in DO or do I need to write > explicit queries to get the job done? No support for this, maybe in the future.... > > 3. How do I go straight from DO to a CSV export? I think I need to use > data structures - anyone got a snippet on this? while($do->fetch) { $row = $do->toCsv() } // something like... - however probably worth using the File_CSV thingy for it.. function toCsv() { return '"'.implode('","', $this->toArray()) . '"'; } > > 4. In tests the find() method does a changeDB query every time it is > called. So within a loop where I am selecting against something, (needed > for checking blacklists numbers in a SMS send) upwards of 100,000 > numbers each send. This is an overhead so how can I set the DB so it > doesnt need to change each time? That sounds odd - it should be caching database connections (although that is really needed, as DB/ the drivers do all that for you..) Regards Alan > > Cheers > > Ian

« previous php.pear.general (#24872) next »