first commit

This commit is contained in:
pakerpale
2020-06-10 06:19:03 +09:00
commit cd6b5b7832
6081 changed files with 624389 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php defined('BASEPATH') or exit('No direct script access allowed');
class member_model extends CI_Model
{
public $table = 'member';
public function __construct()
{
parent::__construct();
$this->load->database();
}
public function findById($id)
{
return $this->db->from($this->table . ' l')->where_in('l.idx', $id)
->join('partner p', 'l.partner_idx=p.idx', 'left')
->select('p.idx editorId, p.partner_img editorImg, p.main_img editorMainImg, p.partner_name editorName, p.partner_intro editorIntro,
l.title, l.head_title, l.sub_title, l.content, l.category_idx categoryId, l.idx, l.main_img mainImg, l.hit_count views, l.like_count likes, l.comment_count comments, l.*');
}
public function findByEditorId($editorId)
{
return $this->db->from($this->table . ' l')->where_in('l.partner_idx', $editorId)
->join('partner p', 'l.partner_idx=p.idx', 'left')
->select('p.idx editorId, p.partner_img editorImg, p.main_img editorMainImg, p.partner_name editorName, p.partner_intro editorIntro,
l.title, l.head_title, l.sub_title, l.content, l.category_idx categoryId, l.idx, l.main_img mainImg, l.hit_count views, l.like_count likes, l.comment_count comments, l.*');
}
public function findAll($categoryId = null)
{
return $this->db->from($this->table . ' l');
}
}