⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_util.php

📁 转载中国源码下载站 1) 基于PHP语言开发,MYSQL数据库驱动的多用户留言本 2) 采用PHP官方提供的编译模板引擎smarty 3) 代码、页面分离
💻 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 + -