...with a message:

PHP Fatal error: Call to undefined method EntityFieldQuery::preExecute() in /path_to_site/sites/all/modules/contrib/devel/devel.module on line 1567


salvis’s picture

Status: Active » Closed (works as designed)

dpq() does this:

 * Print a SQL string from a DBTNG Query object. Includes quoted arguments.

More specifically, preExecute() is a member of the SelectQueryInterface interface. I've fixed the documentation.

EntityFieldQueries are not DBTNG query objects.

andyceo’s picture

Title: dpq() function causes fatal error when trying to dump query of type EntityFieldQuery » Make dpq() function dump query of type EntityFieldQuery
Category: bug » feature
Status: Closed (works as designed) » Active

I think, it would be very nice to dump EntityFieldQuery (and may be other queries) to their SQL representation with one function - dpq().

Have you any idea how to make it real? Or maybe you have other ideas?

fuerst’s picture

Debugging SQL generated by EntityFieldQuery currently seems to be a pain in the ass. I did not find a way yet to view the SQL code from within Drupal/PHP. I ended up using the MySQL query log (http://dev.mysql.com/doc/refman/5.1/en/query-log.html) to get a glue about what SQL get finally created.

jonhattan’s picture

Status: Active » Closed (duplicate)