php pdo kueri beberapa sisipan acak

function updateMultipile($table, $data = array())
{
    $db = DBLink::getInstance();
    foreach($data as $id => $update)
    {
        $sql = "UPDATE ?n SET ?u WHERE location_id = ?i";
        $db->query($table,$update,$id); 
    }
}
Borma