[eluser]xwero[/eluser]
Another change in the problem
Code:
$this->db->query('select name from table where id=?',array($id));
$row = $query->row_array();
$name = $row['name']; // exampe output : test
$query->free_result();
$query = $this->db->query('select count(*) as tel from table where name=?',array($name)):
$row = $query->row_array();
$count = $row['tel']+1;
$query->free_result();
$this->db->query('insert into table (name,count) values (?,?)',array($name,$count));
It is the name value that is the problem, which made the count field react weird so that's why i thought that was the problem.
So there is a value for the name variable but it breaks the insert statement somehow. i tried (string)$row['name'] but with no result.