PHP PDO Query d'insertion multiple aléatoire

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