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


PHP Organization::next方法代码示例

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


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

示例1: get_value

 /**
  * Function to get the value of the entity 
  * @param integer $value
  * @return string $retval
  */
 public static function get_value($value)
 {
     $retval = '';
     if ((int) $value > 0) {
         $object = new Organization();
         $retrun_fields = $object->popup_selection_return_field;
         $retrun_field_list = explode(",", $retrun_fields);
         $object->query("select " . $retrun_fields . " from organization where idorganization = ?", array($value));
         if ($object->getNumRows() > 0) {
             $object->next();
             $cnt_return_fields = 0;
             foreach ($retrun_field_list as $retrun_fields) {
                 if ($cnt_return_fields > 0) {
                     $retval .= ' ';
                 }
                 $retval .= $object->{$retrun_fields};
                 $cnt_return_fields++;
             }
         }
     }
     return $retval;
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:27,代码来源:FieldType131.class.php

示例2: map_related_to_organization

 /**
  * function to map the ralated to (organization) for potentials while importing
  * checks if the organization exists else will add a new one
  * @param string $organization_name
  * @return integer idorganization
  */
 public function map_related_to_organization($organization_name)
 {
     if (strlen($organization_name) > 2) {
         $organization_name = trim($organization_name);
         $do_organization = new Organization();
         $qry = "\n\t\t\tselect `idorganization` \n\t\t\tfrom `organization` \n\t\t\twhere \n\t\t\t`organization_name` = ?\n\t\t\tAND `deleted` = 0 \n\t\t\tAND `iduser` = " . $_SESSION["do_user"]->iduser;
         $do_organization->query($qry, array($organization_name));
         if ($do_organization->getNumRows() > 0) {
             $do_organization->next();
             return $do_organization->idorganization;
         } else {
             $do_organization->insert("organization", array("organization_name" => CommonUtils::purify_input($organization_name), "iduser" => $_SESSION["do_user"]->iduser));
             $idorganization = $do_organization->getInsertId();
             //adding the added_on
             $q_upd = "\n\t\t\t\tupdate `organization`\n\t\t\t\tset `added_on` = '" . date("Y-m-d H:i:s") . "'\n\t\t\t\twhere `idorganization` = " . $idorganization;
             $do_organization->query($q_upd);
             $do_organization->insert("organization_custom_fld", array("idorganization" => $idorganization));
             $do_organization->insert("organization_address", array("idorganization" => $idorganization));
             $do_data_history = new DataHistory();
             $do_data_history->add_history($idorganization, 6, 'add');
             $do_data_history->free();
             return $idorganization;
         }
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:PotentialsImport.class.php

示例3: get_conversion_matrix

 /**
  * function to get the complete conversion information
  * @param integer $idleads
  * @return array if data found else false
  */
 public function get_conversion_matrix($idleads)
 {
     $qry = "select * from `leads_conversion_matrix` where `idleads` = ?";
     $this->query($qry, array($idleads));
     if ($this->getNumRows() > 0) {
         $this->next();
         if ((int) $this->idpotentials > 0) {
             $do_potentials = new Potentials();
             $q_p = "\n\t\t\t\tselect `potential_name` \n\t\t\t\tfrom `" . $do_potentials->getTable() . "` \n\t\t\t\twhere `idpotentials` = ?";
             $do_potentials->query($q_p, array($this->idpotentials));
             if ($do_potentials->getNumRows() > 0) {
                 $do_potentials->next();
                 $return_array["potential"] = array("idpotentials" => (int) $this->idpotentials, "potential_name" => $do_potentials->potential_name);
             }
         }
         if ((int) $this->idorganization > 0) {
             $do_organization = new Organization();
             $q_o = "\n\t\t\t\tselect `organization_name` \n\t\t\t\tfrom `" . $do_organization->getTable() . "` \n\t\t\t\twhere `idorganization` = ?";
             $do_organization->query($q_o, array($this->idorganization));
             if ($do_organization->getNumRows() > 0) {
                 $do_organization->next();
                 $return_array["organization"] = array("idorganization" => (int) $this->idorganization, "organization_name" => $do_organization->organization_name);
             }
         }
         if ((int) $this->idcontacts > 0) {
             $do_contacts = new Contacts();
             $q_c = "\n\t\t\t\tselect `firstname`,`lastname` \n\t\t\t\tfrom `" . $do_contacts->getTable() . "` where `idcontacts` = ?";
             $do_contacts->query($q_c, array($this->idcontacts));
             if ($do_contacts->getNumRows() > 0) {
                 $do_contacts->next();
                 $return_array["contact"] = array("idcontacts" => (int) $this->idcontacts, "contact_name" => $do_contacts->firstname . ' ' . $do_contacts->lastname);
             }
         }
         $do_user = new User();
         $do_user->getId((int) $this->iduser);
         $return_array["user"] = array("user_name" => $do_user->user_name, "fullname" => $do_user->firstname . ' ' . $do_user->lastname);
         $return_array["conversion_date"] = array("conversion_date" => i18nDate::i18n_long_date(TimeZoneUtil::convert_to_user_timezone($this->conversion_date, true), true));
         return $return_array;
     } else {
         return false;
     }
 }
开发者ID:sQcrm,项目名称:sqcrm,代码行数:47,代码来源:LeadConversion.class.php


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