本文整理匯總了PHP中DBUtils::formatTimeStamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBUtils::formatTimeStamp方法的具體用法?PHP DBUtils::formatTimeStamp怎麽用?PHP DBUtils::formatTimeStamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBUtils
的用法示例。
在下文中一共展示了DBUtils::formatTimeStamp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<p><br />
<b><?php
echo $LangUI->_('Reviews');
?>
</b>:<br />
<?php
$sql = "SELECT review_user, review_comments, review_date, user_name FROM {$db_table_reviews}\n\t\tLEFT JOIN {$db_table_users} ON user_id = review_user WHERE review_recipe=? ORDER BY review_date";
$stmt = $DB_LINK->Prepare($sql);
$rc = $DB_LINK->Execute($stmt, array($recipe_id));
// Error check
DBUtils::checkResult($rc, NULL, NULL, $sql);
echo '<br /><br />';
if ($rc->RecordCount() == 0) {
echo $LangUI->_('This recipe has not been reviewed');
} else {
echo '<table cellspacing="1" cellpadding="5" border="0" class="ing" width="80%">';
while (!$rc->EOF) {
$dateTime = DBUtils::formatTimeStamp($rc->fields['review_date']);
echo "<tr><th align=left>" . $rc->fields['user_name'] . ', ';
echo "";
echo $dateTime[2] + 0 . "/" . ($dateTime[3] + 0) . "/" . $dateTime[1] . " ";
echo $dateTime[4] % 12 . ":" . $dateTime[5] . ' ';
echo $dateTime[4] / 12 ? $LangUI->_('pm') : $LangUI->_('am');
echo "</th></tr><tr><td><p>" . $rc->fields['review_comments'] . '</td></tr>';
$rc->MoveNext();
}
echo '</table>';
}
?>