Skip to content

Instantly share code, notes, and snippets.

@6ui11em
Created July 4, 2018 09:56
Show Gist options
  • Save 6ui11em/0fe10da6a78266aed260e2f5e8da8cf9 to your computer and use it in GitHub Desktop.
Save 6ui11em/0fe10da6a78266aed260e2f5e8da8cf9 to your computer and use it in GitHub Desktop.
Magento 2 print collection SQL #magento2 #sql #debug
$collection->load();
// the following statements are equivalent
$collection->getSelect()->assemble();
$collection->getSelect()->__toString();
echo $collection->getSelect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment