该问题已被锁定!
2
关注
3432
浏览

注册会员数是否可以调取?

AI智能回复搜索中,请稍后...

为什么被折叠? 0 个回复被折叠
小明明 中级会员 用户来自于: 山东省青岛市
2015-12-04 20:15
$this->model('system')->count('users');
jhjh626 初级会员 用户来自于: 广东省深圳市
2015-12-05 01:43
注册会员都在user表里面,system/aws_model_inc.php文件有个这个SQL函数,你读一下就好 /**      * 获取记录总数, SELECT COUNT() 方法      *      * 面向对象数据库操作, 表名无需加表前缀, 数据也无需使用 $this->quote 进行过滤 ($where 条件除外)      *      * @param    string      * @param    string      * @return    int      */     public function count($table, $where = '')     {         $this->slave();         $select = $this->select();         $select->from($this->get_table($table), 'COUNT(*) AS n');         if ($where)         {             $select->where($where);         }         $sql = $select->__toString();         if (AWS_APP::config()->get('system')->debug)         {             $start_time = microtime(TRUE);         }         try {             $result = $this->db()->fetchRow($select);         } catch (Exception $e) {             show_error("Database error\n------\n\nSQL: {$sql}\n\nError Message: " . $e->getMessage(), $e->getMessage());         }         if (AWS_APP::config()->get('system')->debug)         {             AWS_APP::debug_log('database', (microtime(TRUE) - $start_time), $sql);         }         return $result['n'];     }  

关于作者

Syouth 初级会员

这家伙很懒,还没有设置简介

问题动态

发布时间
2015-12-03 16:25
更新时间
2015-12-05 01:43
关注人数
2 人关注

相关问题

如何设一个分类,只有VIP会员可以进
希望在下个版本里文章分类能独立开来,甚至可以关闭
3.1版本的编辑器可以支持html和插入flash 地址吗?
突然想到一点。。 anwsion可以很方便地做个类似糗事百科的站点啦
企业可以免费使用wecenter程序吗?保留版权情况
弱弱的问一句,可以出少少费用找人弄下邮件的问题吗?
微信非认证帐号,现在有那些命令可以使用?
应该可以关闭问题修改
刚才官网无法访问,不知道是否个案?
问题补充中可以直接图片上传吗?