When building propel query, is it possible to get final SQL as string?
Best Answer
-
Only via debugger when it's executed (
\Propel\Runtime\ActiveQuery\QueryExecutor\AbstractQueryExecutor::executeStatement
) which has the advantage that you can see the passed in parameters as well.You can also set
$config[PropelConstants::PROPEL_DEBUG] = true
to log all queries into a log file.0
Answers
-
I think on the query object you can call
toString()
or something similar which should give you the actual SQL query?0 -
Only via debugger when it's executed (
\Propel\Runtime\ActiveQuery\QueryExecutor\AbstractQueryExecutor::executeStatement
) which has the advantage that you can see the passed in parameters as well.You can also set
$config[PropelConstants::PROPEL_DEBUG] = true
to log all queries into a log file.0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 65 Spryker News
- 879 Developer Corner
- 743 Spryker Development
- 84 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random