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


PHP Vtiger_Module_Model::getSearchRecordsQuery方法代码示例

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


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

示例1: getSearchRecordsQuery

 /**
  * Function returns query for module record's search
  * @param <String> $searchValue - part of record name (label column of crmentity table)
  * @param <Integer> $parentId - parent record id
  * @param <String> $parentModule - parent module name
  * @return <String> - query
  */
 function getSearchRecordsQuery($searchValue, $parentId = false, $parentModule = false)
 {
     if ($parentId && $parentModule == 'Accounts') {
         $query = "SELECT * FROM vtiger_crmentity\n\t\t\t\t\t\tINNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n\t\t\t\t\t\tWHERE deleted = 0 AND vtiger_contactdetails.parentid = {$parentId} AND label like '%{$searchValue}%'";
         return $query;
     } else {
         if ($parentId && $parentModule == 'Potentials') {
             $query = "SELECT * FROM vtiger_crmentity\n\t\t\t\t\t\tINNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n\t\t\t\t\t\tLEFT JOIN vtiger_contpotentialrel ON vtiger_contpotentialrel.contactid = vtiger_contactdetails.contactid\n\t\t\t\t\t\tWHERE deleted = 0 AND vtiger_contpotentialrel.potentialid = {$parentId}\n\t\t\t\t\t\tAND label like '%{$searchValue}%'";
             return $query;
         } else {
             if ($parentId && $parentModule == 'HelpDesk') {
                 $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_troubletickets ON vtiger_troubletickets.contact_id = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_troubletickets.ticketid  = {$parentId}  AND label like '%{$searchValue}%'";
                 return $query;
             } else {
                 if ($parentId && $parentModule == 'Campaigns') {
                     $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_campaigncontrel ON vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_campaigncontrel.campaignid = {$parentId} AND label like '%{$searchValue}%'";
                     return $query;
                 } else {
                     if ($parentId && $parentModule == 'Vendors') {
                         $query = "SELECT vtiger_crmentity.* FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_vendorcontactrel ON vtiger_vendorcontactrel.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_vendorcontactrel.vendorid = {$parentId} AND label like '%{$searchValue}%'";
                         return $query;
                     } else {
                         if ($parentId && $parentModule == 'PurchaseOrder') {
                             $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_purchaseorder ON vtiger_purchaseorder.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_purchaseorder.purchaseorderid  = {$parentId}  AND label like '%{$searchValue}%'";
                             return $query;
                         } else {
                             if ($parentId && $parentModule == 'SalesOrder') {
                                 $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_salesorder ON vtiger_salesorder.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_salesorder.salesorderid  = {$parentId}  AND label like '%{$searchValue}%'";
                                 return $query;
                             } else {
                                 if ($parentId && $parentModule == 'Invoice') {
                                     $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_invoice ON vtiger_invoice.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_invoice.invoiceid  = {$parentId}  AND label like '%{$searchValue}%'";
                                     return $query;
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return parent::getSearchRecordsQuery($parentId, $parentModule);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:50,代码来源:Module.php

示例2: getSearchRecordsQuery

 /**
  * Function returns query for module record's search
  * @param <String> $searchValue - part of record name (label column of crmentity table)
  * @param <Integer> $parentId - parent record id
  * @param <String> $parentModule - parent module name
  * @return <String> - query
  */
 function getSearchRecordsQuery($searchValue, $parentId = false, $parentModule = false)
 {
     if ($parentId && $parentModule == 'Accounts') {
         $query = "SELECT * FROM vtiger_crmentity\n\t\t\t\t\t\tINNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n\t\t\t\t\t\tWHERE deleted = 0 AND vtiger_contactdetails.parentid = {$parentId} AND label like '%{$searchValue}%'";
         return $query;
     } else {
         if ($parentId && $parentModule == 'HelpDesk') {
             $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_troubletickets ON vtiger_troubletickets.contact_id = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_troubletickets.ticketid  = {$parentId}  AND label like '%{$searchValue}%'";
             return $query;
         } else {
             if ($parentId && $parentModule == 'Campaigns') {
                 $query = "SELECT * FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_campaigncontrel ON vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_campaigncontrel.campaignid = {$parentId} AND label like '%{$searchValue}%'";
                 return $query;
             } else {
                 if ($parentId && $parentModule == 'Vendors') {
                     $query = "SELECT vtiger_crmentity.* FROM vtiger_crmentity\n                        INNER JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_crmentity.crmid\n                        INNER JOIN vtiger_vendorcontactrel ON vtiger_vendorcontactrel.contactid = vtiger_contactdetails.contactid\n                        WHERE deleted=0 AND vtiger_vendorcontactrel.vendorid = {$parentId} AND label like '%{$searchValue}%'";
                     return $query;
                 }
             }
         }
     }
     return parent::getSearchRecordsQuery($parentId, $parentModule);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:30,代码来源:Module.php

示例3: getSearchRecordsQuery

 /**
  * Function returns query for module record's search
  * @param <String> $searchValue - part of record name (label column of crmentity table)
  * @param <Integer> $parentId - parent record id
  * @param <String> $parentModule - parent module name
  * @return <String> - query
  */
 public function getSearchRecordsQuery($searchValue, $parentId = false, $parentModule = false)
 {
     if ($parentId && in_array($parentModule, array('Accounts', 'Contacts'))) {
         $query = "SELECT * FROM vtiger_crmentity\n\t\t\t\t\t\tINNER JOIN vtiger_potential ON vtiger_potential.potentialid = vtiger_crmentity.crmid\n\t\t\t\t\t\tWHERE deleted = 0 AND vtiger_potential.related_to = {$parentId} AND label like '%{$searchValue}%'";
         return $query;
     }
     return parent::getSearchRecordsQuery($parentId, $parentModule);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:15,代码来源:Module.php


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