$table
$table :
photo_model
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* photo_model
* @author zhangwenxin
*
*/
class Photo_model extends CI_Model{
private $table = 'photo';
public function __construct()
{
parent::__construct();
}
/**
* get one data
* */
public function getUserRow($userId = 0)
{
$this->db->where('id', $userId);
$result = $this->db->get($this->table);
return $result->row_array();
}
/**
* get photo thumb
* @param int $id
* @return mixed
*/
public function getThumb($id = 0){
$this->db->where('photo_id', $id);
$result = $this->db->get('photo_thumb');
return $result->row_array();
}
}