i.one i.one - 2 months ago 7
MySQL Question

convert model Codeigniter into MySQL query

how to convert query codeigniter in mysql query



function per_id($id)
{

$this->db->where('activity_detail_id',$id);
$query=$this->db->get('t_trx_activity_detail');
return $query->result();
}




Answer

You can use Mysql query like this

function per_id($id)
{
    $query = $this->db->query("select * from t_trx_activity_detail where activity_detail_id='".$id."'");
    return $query->result();        
}