当前位置: 首页>>代码示例>>PHP>>正文


PHP Opportunity::create_list_query方法代码示例

本文整理汇总了PHP中Opportunity::create_list_query方法的典型用法代码示例。如果您正苦于以下问题:PHP Opportunity::create_list_query方法的具体用法?PHP Opportunity::create_list_query怎么用?PHP Opportunity::create_list_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Opportunity的用法示例。


在下文中一共展示了Opportunity::create_list_query方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testcreate_export_query

 public function testcreate_export_query()
 {
     $opportunity = new Opportunity();
     //test with empty string params
     $expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name ,opportunities_cstm.* ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id  LEFT JOIN opportunities_cstm ON opportunities.id = opportunities_cstm.id_c where \n\t\t\t(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n\t\t\tAND (accounts.deleted is null OR accounts.deleted=0)\n\t\t\tAND opportunities.deleted=0 ORDER BY opportunities.name";
     $actual = $opportunity->create_list_query('', '');
     $this->assertSame($expected, $actual);
     //test with valid string params
     $expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name ,opportunities_cstm.* ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id  LEFT JOIN opportunities_cstm ON opportunities.id = opportunities_cstm.id_c where (accounts.name=\"\") AND \n\t\t\t(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n\t\t\tAND (accounts.deleted is null OR accounts.deleted=0)\n\t\t\tAND opportunities.deleted=0 ORDER BY accounts.id";
     $actual = $opportunity->create_list_query('accounts.id', 'accounts.name=""');
     $this->assertSame($expected, $actual);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:12,代码来源:OpportunityTest.php


注:本文中的Opportunity::create_list_query方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。