You are absolutely right. Thank you.

I noticed there was a params.charset available as well, you might want to
try that out, see if it works. For the MySQL adapter, it runs the SET NAMES
query.

/Jens Ljungblad

On Sat, May 9, 2009 at 12:20 AM, Tom Shaw <php.co...@tx.rr.com> wrote:

> I was able to figure it out using the array setup. I'm sure you can piece
> it
> together using the code below.
>        'params'  => array(
>                        'profiler' => array(
>                                'class' => 'Zend_Db_Profiler_Firebug',
>                                'enabled' => true
>                        )
>            )
>
> Also your bootstrap methods and bootstrap resources are supposed to work in
> unison together *not* ignore one or the other. For instance You've seen a
> portion of my resources array. I had a problem figuring out how to add to
> my
> resources array "SET NAMES 'utf8'" so I created a bootstrap method which
> initialized the resources array settings below.
>
>    public function _initDatabase()
>    {
>        $this->bootstrapDb();
>        $db = $this->getResource('db');
>        $db->setFetchMode(Zend_Db::FETCH_OBJ);
>        $db->query("SET NAMES 'utf8'");
>        $db->query("SET CHARACTER SET 'utf8'");
>        return $db;
>    }
>
> Tom Shaw
> php.co...@tx.rr.com
> twitter/phpower
>
> -----Original Message-----
> From: pakmannen [mailto:jens.ljungb...@tjoff.com]
> Sent: Friday, May 08, 2009 5:00 PM
> To: fw-general@lists.zend.com
> Subject: [fw-general] Zend_Application and Zend_Db_Profiler
>
>
> Hi,
>
> I've been reading up on the new Zend_Application. Looks fantastic! I have
> one quick question: is it possible to add a database profiler using the db
> resource in application.ini? I couldn't find any info on this. And enabling
> it as well, obviously.
>
> If not, where would be a good place to do this? Extend
> Zend_Application_Resource_Db and add the profiler in the init() method?
>
> As far as I could tell, creating _initResource() methods in the actual
> Bootstrap makes the application ignore whatever you put in the
> application.ini file.
>
> /Jens Ljungblad
>
>
> --
> View this message in context:
>
> http://www.nabble.com/Zend_Application-and-Zend_Db_Profiler-tp23454385p23454
> 385.html<http://www.nabble.com/Zend_Application-and-Zend_Db_Profiler-tp23454385p23454%0A385.html>
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>

Reply via email to