1

Was wondering if there is an easier way to see the queries are being being run by my models?

I know the alternate options are xDebug and Firebug but was wondering an easier method.

Anyone?

Thanks

Jonathan Day
  • 18,519
  • 10
  • 84
  • 137
Phantom007
  • 2,079
  • 4
  • 25
  • 37
  • one option i know is save them in a log file – Haim Evgi Oct 20 '10 at 12:38
  • If it's a local dev server it might be appropriate to just tail the database server's log. You can enable logging of all queries in my.cnf for MySQL. – David Snabel-Caunt Oct 20 '10 at 13:36
  • http://framework.zend.com/manual/en/zend.db.profiler.html Similar question http://stackoverflow.com/questions/1009639/zend-db-framework-examine-query-for-an-update – Keyne Viana Oct 20 '10 at 16:34

3 Answers3

6

using Zend_Db_Profiler_Firebug is very easy look at :

http://www.peacocksuit.com/blog/2008/09/02/zend-framework-logging-database-queries-to-firebug/

Haim Evgi
  • 123,187
  • 45
  • 217
  • 223
  • 1
    +1 - Very easy to set up this method purely via config / application resources (no code required). I've had issues with debug toolbar messing up client-side too much, plus it doesn't work with non-HTML responses. – Adrian Schneider Oct 20 '10 at 17:06
1

The ZF debug bar adds an overlay to your page and provides info on file usage, memory usage and which database calls were made when the page was loaded:

http://jokke.dk/software/zfdebug

Bryan M.
  • 17,142
  • 8
  • 46
  • 60
0

for all of us using github

git clone git://github.com/jokkedk/ZFDebug.git   
yellowsir
  • 741
  • 1
  • 9
  • 27