FansGroups.php 672 B

1234567891011121314151617181920212223242526272829
  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. namespace We7\Table\Mc;
  7. class FansGroups extends \We7Table {
  8. protected $tableName = 'mc_fans_groups';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'uniacid',
  12. 'acid',
  13. 'groups',
  14. );
  15. protected $default = array(
  16. 'uniacid' => '0',
  17. 'acid' => '0',
  18. 'groups' => '',
  19. );
  20. public function getByUniacid($uniacid) {
  21. $result = $this->query->where('uniacid', $uniacid)->get();
  22. if (!empty($result)) {
  23. $result['groups'] = iunserializer($result['groups']);
  24. }
  25. return $result;
  26. }
  27. }