| Server IP : 103.48.194.25 / Your IP : 216.73.216.231 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/thegioimaycongnghiep.vn/public_html/site/components/construction/models/ |
Upload File : |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class random_model extends CI_Model
{
public function __construct(){
parent::__construct();
}
public function get_detail()
{
//$this->db->select('raovat.*');
$this->db->where('bl_active',1);
$this->db->order_by('nb_view','ASC');
$this->db->order_by('dt_modify','DESC');
$this->db->order_by('dt_create','DESC');
$query = $this->db->get('raovat',1,0);
return $query->row();
}
public function update_view_detail($id)
{
//capnhat so luot view
$num = rand(30,100);
$sql="update raovat set nb_view=nb_view + $num where raovat_id='".$id."'" ;
$query = $this->db->query($sql);
}
/*function get_sub_category($class_id=0)
{
$this->db->select('class_id as id') ;
$this->db->where('class.class_sub',$class_id);
$this->db->where('class.bl_active',1);
$list = $this->db->get('class')->result();
$arr = array($class_id);
$arr = result_to_array($list, $arr);
return $arr ;
}*/
/*function get_all_town()
{
$this->db->where('town.bl_active',1);
$this->db->order_by('town_id','ASC');
$query = $this->db->get('town');
return $query->result();
}*/
}
?>