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


PHP client::read_db_record方法代码示例

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


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

示例1: get_list

 public static function get_list($_FORM)
 {
     global $TPL;
     $filter = clientContact::get_list_filter($_FORM);
     if (is_array($filter) && count($filter)) {
         $filter = " WHERE " . implode(" AND ", $filter);
     }
     $q = "SELECT clientContact.*, client.*\n            FROM clientContact\n       LEFT JOIN client ON client.clientID = clientContact.clientID\n                 " . $filter . " \n        GROUP BY clientContact.clientContactID \n        ORDER BY clientContactName,clientContact.primaryContact asc";
     $db = new db_alloc();
     $db->query($q);
     while ($row = $db->next_record()) {
         $c = new client();
         $c->read_db_record($db);
         $row["clientLink"] = $c->get_client_link($_FORM);
         $row["clientContactEmail"] and $row["clientContactEmail"] = "<a href=\"mailto:" . page::htmlentities($row["clientContactName"] . " <" . $row["clientContactEmail"] . ">") . "\">" . page::htmlentities($row["clientContactEmail"]) . "</a>";
         $rows[] = $row;
     }
     return $rows;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:19,代码来源:clientContact.inc.php

示例2: array

     $parent_types = array("client" => "Client", "project" => "Project", "task" => "Task", "general" => "General");
     $TPL["parentTypeOptions"] = page::select_options($parent_types);
     include_template("templates/reminderSelectParentTypeM.tpl");
     break;
 case 2:
     // Which project,task,client. (skip for general)
     // get personID
     $personID = $current_user->get_id();
     $parent_names = array();
     $db = new db_alloc();
     if ($parentType == "client") {
         $query = "SELECT * FROM client WHERE clientStatus!='Archived' ORDER BY clientName";
         $db->query($query);
         while ($db->next_record()) {
             $client = new client();
             $client->read_db_record($db);
             $parent_names[$client->get_id()] = $client->get_value('clientName');
         }
     } else {
         if ($parentType == "project") {
             if ($current_user->have_role("admin")) {
                 $query = "SELECT * FROM project WHERE projectStatus != 'Archived' ORDER BY projectName";
             } else {
                 $query = prepare("SELECT * \n                          FROM project \n                     LEFT JOIN projectPerson ON project.projectID=projectPerson.projectID \n                         WHERE personID='%d' \n                           AND projectStatus != 'Archived'\n                      ORDER BY projectName", $personID);
             }
             $db->query($query);
             while ($db->next_record()) {
                 $project = new project();
                 $project->read_db_record($db);
                 $parent_names[$project->get_id()] = $project->get_value('projectName');
             }
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:reminder.php

示例3: get_list

 public static function get_list($_FORM)
 {
     /*
      * This is the definitive method of getting a list of clients that need a sophisticated level of filtering
      *
      */
     global $TPL;
     $filter = client::get_list_filter($_FORM);
     $debug = $_FORM["debug"];
     $debug and print "<pre>_FORM: " . print_r($_FORM, 1) . "</pre>";
     $debug and print "<pre>filter: " . print_r($filter, 1) . "</pre>";
     $_FORM["return"] or $_FORM["return"] = "html";
     if (is_array($filter) && count($filter)) {
         $filter = " WHERE " . implode(" AND ", $filter);
     }
     $cc = config::get_config_item("clientCategories");
     foreach ($cc as $k => $v) {
         $clientCategories[$v["value"]] = $v["label"];
     }
     $q = "SELECT client.*,clientContactName, clientContactEmail, clientContactPhone, clientContactMobile\n            FROM client \n       LEFT JOIN clientContact ON client.clientID = clientContact.clientID AND clientContact.clientContactActive = 1\n                 " . $filter . " \n        GROUP BY client.clientID \n        ORDER BY clientName,clientContact.primaryContact asc";
     $debug and print "Query: " . $q;
     $db = new db_alloc();
     $db2 = new db_alloc();
     $db->query($q);
     while ($row = $db->next_record()) {
         $print = true;
         $c = new client();
         $c->read_db_record($db);
         $row["clientCategoryLabel"] = $clientCategories[$c->get_value("clientCategory")];
         $row["clientLink"] = $c->get_client_link($_FORM);
         $row["clientContactEmail"] and $row["clientContactEmail"] = "<a href=\"mailto:" . page::htmlentities($row["clientContactName"] . " <" . $row["clientContactEmail"] . ">") . "\">" . page::htmlentities($row["clientContactEmail"]) . "</a>";
         $rows[$c->get_id()] = $row;
     }
     return (array) $rows;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:35,代码来源:client.inc.php


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