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


PHP SQL::getAssoc方法代码示例

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


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

示例1: getPrograms

 function getPrograms($id = '')
 {
     if (!$id) {
         $id = $this->zonedata['id'];
     }
     $fields = 'z.program_id AS id, p.program AS program';
     $table = 'tblZones AS z, tblPrograms AS p';
     $param = sprintf("z.parent_id = '%s' AND p.id = z.program_id", $id);
     return SQL::getAssoc($table, $fields, $param);
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:10,代码来源:zone.php

示例2: getQuestionList

 function getQuestionList($question_list = '')
 {
     // Used to preview questionaire in the addSurvey form
     $ql = SQL::getAssoc('tblSurveyItems', 'id,question', sprintf("FIND_IN_SET(id,'%s')", $question_list));
     $question_list = explode(',', $question_list);
     $preView = "<TABLE cellpadding=0 cellspacing=0><TR><TD><OL>";
     for ($i = 0; $i < count($question_list); $i++) {
         $preView .= "<LI class=n02>" . $ql[$question_list[$i]];
     }
     $preView .= "</OL></TD></TR></TABLE>";
     return $preView;
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:12,代码来源:survey.php

示例3: loadloans

 function loadloans()
 {
     $this->data['loans'] = SQL::getAssoc('tblLoansMasterDetails AS lmd, tblLoans AS l', 'l.id, l.status', sprintf('lmd.master_id = %s AND l.id = lmd.loan_id', $this->data['id']));
     foreach ($this->data['loans'] as $status) {
         $this->data['cancelled'] = false;
         if ($status != 'C') {
             break;
         } else {
             $this->data['cancelled'] = true;
         }
     }
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:12,代码来源:loan_master.php

示例4: getAll

 function getAll($status = '')
 {
     $status_operator = '=';
     if (!$status) {
         $status_operator = 'like';
         $status = '%%';
     }
     $fields = 'id, program';
     $table = 'tblPrograms';
     $param = sprintf("status %s '%s'", $status_operator, $status);
     return SQL::getAssoc($table, $fields, $param);
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:12,代码来源:program.php

示例5: loadPayments

 function loadPayments($id = '')
 {
     if (!$id) {
         $id = $this->data['id'];
     }
     $fields = 'p.*,l.loan_code,concat(left(c.first,1),"."," ",left(c.last,14)) client';
     $param = sprintf("rp.receipt_id = '%s' AND p.id = rp.payment_id AND l.id = p.loan_id AND c.id = l.client_id", $id);
     $table = 'tblLinkReceiptsPayments AS rp, tblPayments AS p, tblLoans l, tblClients c';
     $this->data['payments']['normal'] = SQL::getAssoc($table, $fields, $param);
     $table = 'tblLinkReceiptsPayments AS rp, tblPaymentsRollback AS p, tblLoans l, tblClients c';
     $this->data['payments']['rollback'] = SQL::getAssoc($table, $fields, $param);
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:12,代码来源:receipt.php

示例6: currencys

 function currencys()
 {
     return SQL::getAssoc('tblCurrencys', 'id,currency');
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:4,代码来源:loan_type.php

示例7: getBusiness

 function getBusiness()
 {
     return SQL::getAssoc("tblBusiness AS b, tblClients as c", "b.id, b.name", sprintf("c.id = '%s' AND FIND_IN_SET(c.id,b.client_list)", $this->data['id']));
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:4,代码来源:client.php

示例8: getName

 function getName($userID)
 {
     return current(SQL::getAssoc('tblUsers', "id, CONCAT(first, ' ', last)", sprintf("id = '%s'", $userID)));
 }
开发者ID:henkmahendra,项目名称:emms-devel,代码行数:4,代码来源:user.php


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