[eluser]Unknown[/eluser]
<?php
class imrtrackerModel extends CI_Model {
private $imrmain= 'imrmain';
function imrtracker(){
parent::__construct();
}
function save($imrtracker){
try
{
$rc_save = $this->db->insert($this->imrmain, $imrtracker);
echo 'outside error';
if (! $rc_save)
{
throw new Exception();
}
}
catch (Exception $e)
{
echo 'exception';
}
}
}
?>
The above is my model code. I want to capture the duplicate entries. But i am not able to handle the error. Kindly help me. Am new to Codeigniter.