php - 如何在 prestashop 管理 Controller 中找到受影响的查询

标签 php mysql sql prestashop

在 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/

相关文章:

mysql - 按降序选择每第 n 行

sql - 所有祖先/ parent 和 child 的单一分层查询 (DB2/SQL Server)

php - WordPress Widget API 中的表单归档是否需要 get_field_id()?

php - 发布 PHP CMS ......如何?

php - 上传多个文件php和mysql

mysql - Docker:在停止的容器中编辑 "my.cnf"文件

mysql - SQL查询多个表,其中1中不存在记录

sql - 保持 SQL 干燥

php - 如何在 zend 中获取数据库中表的列名?

PHP Post 调用不返回变量