本文整理汇总了PHP中comment::set_where方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::set_where方法的具体用法?PHP comment::set_where怎么用?PHP comment::set_where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::set_where方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: module_comment
function module_comment()
{
global $global, $smarty;
if ($global['id']) {
$obj = new comment();
$obj->set_where('com_channel_id = ' . get_id('channel', 'cha_code', $global['channel']));
$obj->set_where('com_page_id = ' . $global['id']);
$obj->set_page_size(5);
$obj->set_page_num($global['page']);
$sheet = $obj->get_sheet();
set_link($obj->get_page_sum());
$smarty->assign('comment', $sheet);
}
}
示例2: module_comment_edit
function module_comment_edit()
{
global $global, $smarty;
$obj = new comment();
$obj->set_where('com_id = ' . $global['id']);
$one = $obj->get_one();
$one['channel'] = '';
$one['title'] = '';
$obj = new channel();
$list = $obj->get_list();
for ($i = 0; $i < count($list); $i++) {
if ($list[$i]['cha_id'] == $one['com_channel_id']) {
$one['channel'] = $list[$i]['cha_code'];
$original = $list[$i]['cha_code'];
if ($list[$i]['cha_original'] != 0) {
for ($j = 0; $j < count($list); $j++) {
if ($list[$i]['cha_original'] == $list[$j]['cha_id']) {
$original = $list[$j]['cha_code'];
}
}
}
if ($original == 'goods') {
$table = 'goods';
} else {
$table = 'article';
}
$one['title'] = get_data($table, $one['com_page_id'], substr($table, 0, 3) . '_title');
}
}
$smarty->assign('comment', $one);
}
示例3: reply_comment
function reply_comment()
{
global $smarty, $lang;
$com_id = post('com_id');
$com_reply = post('com_reply');
$obj = new comment();
$obj->set_value('com_reply', $com_reply);
$obj->set_where("com_id = {$com_id}");
$obj->edit();
$smarty->assign('info_text', '回复评论成功');
$smarty->assign('link_text', $lang['return_list']);
$smarty->assign('link_href', url(array('channel' => 'service', 'mod' => 'comment_sheet')));
}
示例4: comment
<?php
require 'components/get_listview_referrer.php';
require 'subclasses/comment.php';
$dbh_comment = new comment();
$dbh_comment->set_where("id='" . quote_smart($id) . "'");
if ($result = $dbh_comment->make_query()->result) {
$data = $result->fetch_assoc();
extract($data);
$data = explode('-', $date);
if (count($data) == 3) {
$date_year = $data[0];
$date_month = $data[1];
$date_day = $data[2];
}
}