本文整理汇总了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;
}
示例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;
}