本文整理匯總了PHP中DbUtil::priority方法的典型用法代碼示例。如果您正苦於以下問題:PHP DbUtil::priority方法的具體用法?PHP DbUtil::priority怎麽用?PHP DbUtil::priority使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DbUtil
的用法示例。
在下文中一共展示了DbUtil::priority方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getClass
<?php
/**
* Created by PhpStorm.
* User: Hallvard
* Date: 26.10.2015
* Time: 15.58
*/
//BLIR BRUKT I GUILD MEMBERS
include 'inc/dbutil.php';
$obj = new DbUtil();
$obj->priority();
$tmpVal = $obj->getTable();
echo "<table class='table'>";
foreach ($tmpVal as $row) {
if ($row['guildmembership'] == 1) {
if (!isset($_SESSION['user']) || $_SESSION['guildmembership'] == 0) {
echo "<tr><th>Character name</th><th>Class</th><th>Race</th></tr>";
echo "<tr>";
echo "<td>" . $row['username'] . "</td>\n <td> " . getClass($row['class']) . "</td>\n <td> " . getRace($row['race']) . "</td>";
echo "</tr>";
} else {
echo "<tr><th>Character name</th><th>Class</th><th>Race</th><th>Priority</th></tr>";
echo "<tr>";
echo "<td>" . $row['username'] . "</td>\n <td> " . getClass($row['class']) . "</td>\n <td> " . getRace($row['race']) . "</td>\n <td>" . round($row['priority'], 2) . "</td>";
echo "</tr>";
}
}
}
echo "</table>";
function getClass($num)