NYCPHP Meetup

NYPHP.org

[nycphp-talk] Debugging Zend_Db SQL

Brian Dailey support at dailytechnology.net
Fri Aug 10 09:48:09 EDT 2007


For future reference, the easiest way (in postDispatch()) was:

$dbAdapter = Zend_Registry::get( 'dbAdapter' );
$profiler = $dbAdapter->getProfiler( );
$query = $profiler->getLastQueryProfile( );
echo $query->getQuery( );

- Brian


Jon Baer wrote:
>  From what I recall most of the framework objects should already have a 
> __toString() overload on them so you can just echo/dump the select itself.
> 
> - Jon
> 
> On Aug 9, 2007, at 11:34 AM, Brian Dailey wrote:
> 
>> I'm just starting to dabble with Zend's framework, and I don't see an 
>> easy way to check what the SQL output is when I'm executing a 
>> statement. I'd like to just output the whole query so I can monitor 
>> what it's sending. Does anyone know a quick & dirty way to do this?
>>
>>
>> -- 
>>
>> Thanks!
>> - Brian Dailey
>> Software Developer
>> New York, NY
>> www.dailytechnology.net<support.vcf>_______________________________________________ 
>>
>> New York PHP Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> NYPHPCon 2006 Presentations Online
>> http://www.nyphpcon.com
>>
>> Show Your Participation in New York PHP
>> http://www.nyphp.org/show_participation.php
> 
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 
> 

-- 

Thanks!
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.vcf
Type: text/x-vcard
Size: 264 bytes
Desc: not available
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070810/067e22ef/attachment.vcf>


More information about the talk mailing list