When I cast query to string, I can see WHERE that will be passed to the database, like this:

WHERE  (idProperty = :db_condition_placeholder_0)
  AND  (idCategory = :db_condition_placeholder_1)

But how can I extract these placeholders?

  • Wasn't able to find it here. Not that complicated, but I believe it may be useful for some readers.
    – Mołot
    Commented Aug 28, 2014 at 13:26

1 Answer 1


This can be done using arguments:

echo (string)$query;

This simple code will give you both query and arguments, for simple debugging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.