1. Go to this page and download the library: Download tumtum/sw6-sql-logger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ray()->showQueries()
// This query will be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);
ray()->stopShowingQueries();
// This query won't be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);
// This query won't be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);
ray()->showQueries(function() {
// This query will be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);
});
$users = ray()->showQueries(function () {
// This query will be displayed and the collection will be returned.
return $this->productRepository->search(new Criteria(['product.id']), $context);
});
$this->productRepository->search(new Criteria(['product.id']), $context); // this query won't be displayed.
#Classic
\StartSQLLog(useRayDumper: true);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.