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


PHP Main::generateRows方法代码示例

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


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

示例1: listReport

 public function listReport()
 {
     $orderBy = $_GET['orderBy'];
     if (!$orderBy) {
         $orderBy = "Date DESC";
     }
     $whereStatus = mysql_real_escape_string($_GET['Status']);
     $whereQueue = mysql_real_escape_string($_GET['Queue']);
     $whereWPLGeo = mysql_real_escape_string($_GET['WPLGeo']);
     $whereWBGeo = mysql_real_escape_string($_GET['WBGeo']);
     $whereQAGeo = mysql_real_escape_string($_GET['QAGeo']);
     //        $rs = mysql_query("
     //            SELECT Date,
     //                   DueDate,
     //                   Task,
     //                   Complexity,
     //                   PlatImplementation,
     //                   Category,
     //                   NumberOfPages,
     //                   Comments,
     //                   flag_comment,
     //                   WPL.Name,
     //                   WPL.Geography,
     //                   Builder.Name,
     //                   Builder.Geography,
     //                   Builder.Queue,
     //                   QA.Name,
     //                   QA.Geography,
     //                   QA.Queue,
     //                   Errors.TypeError_IdTypeError,
     //                   Errors.ErrorName,
     //                   Errors_has_Report.Quantity
     //              FROM Report
     //              LEFT JOIN Builder ON Report.Builder_Email = Builder.Email
     //              LEFT JOIN QA ON Report.QA_Email = QA.Email
     //              LEFT JOIN WPL ON Report.WPL_Email = WPL.Name
     //              LEFT JOIN Errors_has_Report ON Report.idReport = Errors_has_Report.Report_idReport
     //              LEFT JOIN Errors ON Errors_has_Report.Errors_idErrors = Errors.idErrors
     //              LEFT JOIN TypeError ON TypeError.idTypeError = Errors.TypeError_IdTypeError
     //             ORDER BY {$orderBy} LIMIT 100");
     $rs = mysql_query("\r\n            SELECT {$_GET['target']},Report.QAapproved,Report.flagged\r\n              FROM Report\r\n              LEFT JOIN Builder ON Report.Builder_Email = Builder.Email\r\n              LEFT JOIN QA ON Report.QA_Email = QA.Email\r\n              LEFT JOIN WPL ON Report.WPL_Email = WPL.Name\r\n              LEFT JOIN Errors_has_Report ON Report.idReport = Errors_has_Report.Report_idReport\r\n              LEFT JOIN Errors ON Errors_has_Report.Errors_idErrors = Errors.idErrors\r\n              LEFT JOIN TypeError ON TypeError.idTypeError = Errors.TypeError_IdTypeError\r\n              LEFT JOIN Queues ON Report.PlatImplementation = Queues.PlatImplement\r\n             WHERE Report.Date BETWEEN '{$_GET['From']}' AND '{$_GET['To']}' \r\n               AND (Report.QAapproved = '{$whereStatus}' OR '{$whereStatus}' = '')\r\n               AND (Queues.Queue LIKE '%{$whereQueue}%' OR '{$whereQueue}' = '')\r\n               AND (WPL.Geography LIKE '%{$whereWPLGeo}%' OR '{$whereWPLGeo}' = '')\r\n               AND (Builder.Geography LIKE '%{$whereWBGeo}%' OR '{$whereWBGeo}' = '')\r\n               AND (QA.Geography LIKE '%{$whereQAGeo}%' OR '{$whereQAGeo}' = '')\r\n             ORDER BY {$orderBy} LIMIT 1000");
     $rows = "";
     while ($data = mysql_fetch_array($rs)) {
         $rows .= Main::generateRows($data, null, array("QAapproved", "flagged"), create_function('$data', 'return $data["QAapproved"] == 0 ? "OrangeRed" : 
                                 ($data["QAapproved"] == 1 ? "Green" : 
                                 ($data["QAapproved"] == 2 ? "MediumAquaMarine" : 
                                 ($data["flagged"] == 1 ? "Orange" : "")));'));
     }
     return $rows == "" ? "<tr><td colspan='20'><font color='red'>No data was found.</font></td></tr>" : $rows;
 }
开发者ID:rcom10002,项目名称:codeslab,代码行数:50,代码来源:full.php

示例2: listMember

 public function listMember()
 {
     $role = $_GET['Role'];
     $rs = mysql_query("SELECT * FROM {$_GET['Role']}");
     $rows = "";
     while ($data = mysql_fetch_array($rs)) {
         $rows .= Main::generateRows($data);
     }
     return $rows;
 }
开发者ID:rcom10002,项目名称:codeslab,代码行数:10,代码来源:member.php


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