[eluser]barbazul[/eluser]
I've done some testing and checked the AR code and then I realized that for some reason, when multiple tables are passed in an array, the method simply returns NULL.
check DB_active_rec.php line 1318
so you'll always enter the if in your example.
Maybe there is the need to double check what the desired functionality for this AR method is, but to quickly fix your code use the following:
Code:
$success = TRUE;
foreach ($tables as $t) {
if (! $this->db->delete($t,array("user_id"=>$user_id))) {
$success = FALSE;
}
}
return $success;