加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 数据库 > MsSql > 正文

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

发布时间:2020-05-25 11:42:47 所属栏目:MsSql 来源:互联网
导读:Magento构造它的SQL查询,如 $this-getSelect()-joinInner( array(sbao = $this-getTable(sales/billing_agreement_order)), main_table.entity_id = sbao.order_id, array() ) 有没有办法

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;

(编辑:安卓应用网)

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

    推荐文章
      热点阅读