加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

如何将Magento sql查询显示为字符串?

发布时间:2020-12-12 06:46:29 所属栏目:MsSql教程 来源:网络整理
导读:Magento构造它的SQL查询,如 $this-getSelect()-joinInner( array('sbao' = $this-getTable('sales/billing_agreement_order')),'main_table.entity_id = sbao.order_id',array() ) 有没有办法以字符串格式显示结果查询,而不是打印出巨大的对象,例如 echo $thi
Magento构造它的SQL查询,如
$this->getSelect()->joinInner(
        array('sbao' => $this->getTable('sales/billing_agreement_order')),'main_table.entity_id = sbao.order_id',array()
    )

有没有办法以字符串格式显示结果查询,而不是打印出巨大的对象,例如

echo $this->getSelect()->joinInner(
        array('sbao' => $this->getTable('sales/billing_agreement_order')),array()
    )->toString();

解决方法

$select = $this->getSelect()->joinInner(
        array('sbao' => $this->getTable('sales/billing_agreement_order')),array()
    );

echo $select;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读