當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。