Example #1
0
 public function count_stories_by_member($mem_sn, $page, $pageSize)
 {
     $this->db->select("count(*) as cnt");
     $this->db->where("userID", $mem_sn);
     $this->db->where("deleted", 0);
     $this->page($page, $pageSize);
     $query = $this->db->get($this->_table);
     return array_first_item($query->result())->cnt;
 }
Example #2
0
 function _get_mem_info($in_obj = "", $in_type = "email")
 {
     switch ($in_type) {
         case "mem_sn":
             $this->db->where("mem.mem_sn", $in_obj);
             break;
         case "email":
             $this->db->where("mem.email", $in_obj);
             break;
         case "mid":
             $this->db->where("mem.mid", $in_obj);
             break;
         case "nick_name":
             $this->db->where("mem.nick_name", $in_obj);
             break;
     }
     $this->db->limit(1);
     $results = $this->db->get($this->_table)->result();
     return array_first_item($results);
 }