[eluser]stef25[/eluser]
Can anyone explain why this statement:
Code:
print $res . " rows inserted when sizeof(data) is " . sizeof($data) ;
prints out
Code:
30 rows inserted when sizeof(data) is 130
Relevant code
Code:
$res = $this->m_immo->write_props($data);
function write_props($data)
{
$this->db->insert_batch("immo_props", $data);
return $this->db->affected_rows();
}
So it seems that affected_rows returns 30 but when I check the DB, 130 rows are inserted which matches the sizeof($data).
How come?
EDIT: with a second test I'm getting this as output:
Code:
85 rows inserted when sizeof(data) is 285
In both cases it just leaves out the first digit.
With a 3rd test I get this
Code:
65 rows inserted when sizeof(data) is 65
And a 4th test shows
Code:
8 rows inserted when sizeof(data) is 108
Stumped!