This method receives an array of data and does some stuff in a database. I need to get some reviews on it if possible.
public function doSomeStuff($arr = array())
{
$id = $arr['Employee']['id'];
$name = $arr['Employee']['name'];
$status = $arr['Employee']['status'] == 'Disabled' ? 0 : 1;
$user_id = $arr['Employee']['user_id'];
$query = "update `mytable` set `status` = $status, `name`=$name WHERE `user_id` = ?";
self::_runthis($query, array($user_id));
}
I am looking to see if this is fool-proof for the data it will receive and will process it.