本文整理汇总了PHP中unknown::get_row方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::get_row方法的具体用法?PHP unknown::get_row怎么用?PHP unknown::get_row使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::get_row方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_function_getrss
/**
*
*
* @param unknown $params
* @param unknown $bBlog (reference)
* @return unknown
*/
function smarty_function_getrss($params, &$bBlog)
{
$outputcharset = 'UTF8';
if (isset($params['id'])) {
$rssrow = $bBlog->get_row("select * from " . T_RSS . " where url<>'' and id='" . $params['id'] . "'");
} else {
// get random one
$rssrow = $bBlog->get_row("select * from " . T_RSS . " where url<>'' order by rand(" . time() . ") limit 0,1");
}
if (!isset($params['limit'])) {
$params['limit'] = 20;
}
return get_rss($rssrow->url, $rssrow->input_charset, $outputcharset, $params['limit']);
}
示例2: admin_plugin_rss_run
/**
*
*
* @param unknown $bBlog (reference)
*/
function admin_plugin_rss_run(&$bBlog)
{
$pole = "";
for ($i = 1; $i < 10; $i++) {
if (isset($_POST['sending']) && $_POST['sending'] == "true") {
$id = $_POST[id . $i];
$ch = $_POST[ch . $i];
$update_query = "UPDATE " . T_RSS . " SET `url` = '" . $id . "',`input_charset` = '" . $ch . "' WHERE `id` = '" . $i . "' LIMIT 1 ;";
$bBlog->query($update_query);
}
$query = "select * from " . T_RSS . " where id=" . $i . ";";
$row = $bBlog->get_row($query);
$rssurl = $row->url;
$w1250 = "";
if ($row->input_charset == "W1250") {
$w1250 = " selected";
}
$utf8 = "";
if ($row->input_charset == "UTF8") {
$utf8 = " selected";
}
if ($i / 2 == floor($i / 2)) {
$class = 'high';
} else {
$class = 'low';
}
$pole .= '<tr class="' . $class . '"><td>' . $i . '</td><td><input type="text" name="id' . $i . '" size="20" value="' . $rssurl . '" class="text" /></td><td><select name="ch' . $i . '">';
$pole .= '<option>I88592</option>';
$pole .= '<option' . $w1250 . '>W1250</option>';
$pole .= '<option' . $utf8 . '>UTF8</option>';
$pole .= '</select></td></tr>';
}
$bBlog->assign('pole', $pole);
}