本文整理汇总了PHP中DAO::fetchUserName方法的典型用法代码示例。如果您正苦于以下问题:PHP DAO::fetchUserName方法的具体用法?PHP DAO::fetchUserName怎么用?PHP DAO::fetchUserName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAO
的用法示例。
在下文中一共展示了DAO::fetchUserName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: q5
function q5()
{
$dao = new DAO();
$q = "SELECT USERID FROM Q5 WHERE NUM = (SELECT MAX(NUM) FROM Q5)";
$stmt = oci_parse($dao->con, $q);
oci_execute($stmt, OCI_DEFAULT);
oci_fetch_all($stmt, $rs);
foreach ($rs as $rows) {
echo "";
foreach ($rows as $col_values) {
echo "User contributed most reviews: " . $dao->fetchUserName($col_values) . '<br>';
}
}
oci_free_statement($stmt);
$q = "SELECT USERID FROM Q5 WHERE NUM = (SELECT MAX(NUM) FROM Q5)";
$stmt = oci_parse($dao->con, $q);
oci_execute($stmt, OCI_DEFAULT);
oci_fetch_all($stmt, $rs);
foreach ($rs as $rows) {
echo "";
foreach ($rows as $col_values) {
echo "User contributed most comments on threads: " . $dao->fetchUserName($col_values) . '<br>';
}
}
}
示例2: displayFollowUp
function displayFollowUp()
{
$dao = new DAO();
$rs = $dao->fetchFollowUpIDs($_GET['tid']);
foreach ($rs as $rows) {
foreach ($rows as $value) {
echo '<div class="container">';
echo '<p> To:' . $dao->fetchThreadName($value) . '  Reply By ' . $dao->fetchUserName($dao->fetchUserIDByThreadID($value)) . '<br>' . $dao->fetchThreadContent($value) . '</p>';
echo '</div>';
}
}
}
示例3: displayGuestInfo
function displayGuestInfo()
{
$dao = new DAO();
$rs = $dao->fetchGuestList();
echo 'Avalible Guest to View: <br>';
echo '<table border=0>';
foreach ($rs as $row) {
foreach ($row as $id) {
echo '<tr>';
$loginName = $dao->fetchLoginName($id);
$changeLink = "<a href=\"account.php?loginName={$loginName}\">" . 'view' . '</a>';
echo '<td> Guest: ' . $dao->fetchUserName($id) . '</td><td> ' . $changeLink . '</td><td>';
echo '</tr>';
}
}
echo '</table>';
}