php - Propel: Get Raw SQL from Query object? -


how raw sql statement query object in propel? need debugging purposes.

for example: have function in

$rawsql = new bookquery::create()->filterbyid(25)->getrawsql(); 

does exist?

yes; you're after tostring method criteria parent class:

$rawsql = (new bookquery)::create()->filterbyid(25)->tostring(); 

as @jakerella says, specific values use filtering bound database engine, rather propel, , you'll see structure of query not executed. if want see that, can check database query logs, if they're enabled.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -