📄 c_util.php
字号:
<?php
/**
* CuteBook 多用户留言本
* 程式版權 (c) 2001 by midiguy www.jaxp.net
* 作者Email: midiguy@263.net 欢迎批评指正
* 请不要修改版权信息,谢谢
*/
class c_util extends c_base {
function get_replies_count_by_topic($fatherid)
{
global $db_table;
$SQL = "SELECT id from " . $db_table['reply'] . " where father_id=" . $fatherid;
$result = $this->c_db->query($SQL);
$total = $this->c_db->num_rows($result);
return $total;
}
function get_topics_count_by_user($userid)
{
global $db_table;
$SQL = "SELECT id from " . $db_table['topic'] . " where userid=" . $userid;
$result = $this->c_db->query($SQL);
$total = $this->c_db->num_rows($result);
return $total;
}
function get_replies_count_by_user($userid)
{
global $db_table;
$SQL = "SELECT t1.id from " . $db_table['reply'] . " as t1," . $db_table['topic'] . " as t2 where t1.father_id=t2.id and t2.userid=" . $userid;
$result = $this->c_db->query($SQL);
$total = $this->c_db->num_rows($result);
return $total;
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -