first commit
This commit is contained in:
24
application/models/likelog_model.php
Executable file
24
application/models/likelog_model.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class comment_model extends CI_Model
|
||||
{
|
||||
|
||||
private $table = 'like_log';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->database();
|
||||
}
|
||||
|
||||
public function findById($id) {
|
||||
return $this->db->where('idx', $id)->get($this->table)->row();
|
||||
}
|
||||
|
||||
public function findByContentTypeAndContentId($type, $id) {
|
||||
return $this->db->from($this->table. ' ll')
|
||||
->where('content_type', $type)
|
||||
->where('content_idx', $id);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user