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
Post a Comment