在 prestashop 管理 Controller 中,我们添加了一个类似下面的文件来生成表 ListView 。
$this->table = 'product';
$this->list_id = 'no_stock_products_attributes';
$this->lang = true;
$this->identifier = 'id_product';
$this->_orderBy = 'id_product';
$this->_orderWay = 'DESC';
$this->className = 'Product';
我想查看最终/完整的查询。有没有办法得到它并给出可运行的查询?
喜欢print_r($this->query());
或喜欢print_r($this->_query());
最佳答案
您可以在/config/defines.inc.php 中启用调试分析 这将在页面底部抛出一个包含所有已执行查询的列表。 请注意,这还会在前端抛出一个查询列表和技术数据。
关于php - 如何在 prestashop 管理 Controller 中找到受影响的查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25250432/