reply.table.php 517 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. class ReplyTable extends We7Table {
  8. public function getModuleReplayCount($modules, $rid) {
  9. $result['sum'] = 0;
  10. foreach ($modules as $module) {
  11. $result[$module] = $this->query->from($module.'_reply')->where('rid', $rid)->count();
  12. $result['sum'] += $result[$module];
  13. }
  14. return $result;
  15. }
  16. }