Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you want to view the complete sql statement you can use Zend_Debug. For example if your sql statement is in the variable $select and you want to view the complete sql statement you can use the following line of code:</p> <pre><code>Zend_Debug::Dump($select); exit; </code></pre> <p>Or if your code is created withe the Zend_Db_Table class you can use:</p> <pre><code>$select = new Zend_Db_Select(Zend_Registry::get('db')); $select-&gt;from('string'); Zend_Debug::Dump($select-&gt;assemble()); exit; </code></pre> <p>I think the best way to view the sql statement is by using the profiling function on the database connection. This is combination withe the logging function and the firePHP add-on for Firefox is my favorite setup.</p> <p>If you use the MVC configuration of Zend Framework this is done white this lines of code:</p> <pre><code>// setup the database connection $db = Zend_Db::factory(Zend_Registry::get('config')-&gt;database-&gt;adapter,Zend_Registry::get('config')-&gt;database-&gt;params); // create a new profiler profiler = new Zend_Db_Profiler_Firebug('All DB Queries'); // enable profiling (this is only recommended in development mode, disable this in production mode) $profiler-&gt;setEnabled(true); // add the profiler to the database object $db-&gt;setProfiler($profiler); // setup the default adapter to use for database communication Zend_Db_Table_Abstract::setDefaultAdapter($db); // register the database object to access it in other parts of the project Zend_Registry::set('db',$db); /** * * This part is optional * * You can use this logger to log debug information to the firephp add-on for Firefox * This is handy for debugging but must be disabled in production mode * */ // create logger $logger = new Zend_Log(); // create firebug writer $firebug_writer = new Zend_Log_Writer_Firebug(); // add writer to logger $logger-&gt;addWriter($firebug_writer); // register the logger object to access it in other parts of the project Zend_Registry::set('log',$logger); </code></pre> <p>The firebug add-on (requirement for firephp) can be found on this website: <a href="http://getfirebug.com/" rel="nofollow noreferrer">Firebug</a></p> <p>The FirePHP add-on can be found on this website: <a href="http://www.firephp.org/" rel="nofollow noreferrer">FirePHP</a></p> <p>Ivo Trompert</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload