i was checking the affected_rows but i experience such bug from my model. my model code below
namespace AppModels;
use CodeIgniterModel;
class ContactModel extends Model {
public function saveData($data)
{
$db= ConfigDatabase::connect();
$builder = $db->table('message');
$res = $builder->insert($data);
if ($res->connID->affected_rows>=1)
{
return true;
}
else
{
return false;
}
}
}