1

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 Aug 28 '14 at 13:26
1

This can be done using arguments:

echo (string)$query;
var_dump($query->arguments());

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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