public function updateRow($id, array $data) : void
    {
        $this->crudEnabled();

        // Generate the values
        $components = $this->dbc->generateParameterizedComponents($data);
        $table_name = static::$table_name;
        $id_column = static::$id_column;
        $fields = $components['update'];
        $params = $components['params'];
        $params[':key'] = $id;

        // Execute the query
        $sql = "UPDATE {$table_name} SET {$fields} WHERE {$id_column} = :key";
        $this->dbc->query($sql, ['params' => $params]);
    }
public function updateRow($id, array $data) : void
    {
        $this->crudEnabled();

        // Generate the values
        $components = $this->dbc->generateParameterizedComponents($data);
        $table_name = static::$table_name;
        $id_column = static::$id_column;
        $fields = $components['update'];
        $params = $components['params'];
        $params[':key'] = $id;

        // Execute the query
        $sql = "UPDATE {$table_name} SET {$fields} WHERE {$id_column} = :key";
        $this->dbc->query($sql, ['params' => $params]);
    }
public function updateRow ( $ id , array $ data ) : void { $ this -> crudEnabled ( ) ; // Generate the values $ components = $ this -> dbc -> generateParameterizedComponents ( $ data ) ; $ table_name = static :: $ table_name ; $ id_column = static :: $ id_column ; $ fields = $ components [ 'update' ] ; $ params = $ components [ 'params' ] ; $ params [ ':key' ] = $ id ; // Execute the query $ sql = "UPDATE {$table_name} SET {$fields} WHERE {$id_column} = :key" ; $ this -> dbc -> query ( $ sql , [ 'params' => $ params ] ) ; }
Updates an existing row, based on the passed identifier. If the necessary crud fields have not been identified
in the child class, this function will throw an exception.

@param mixed $id The id of the row to update
@param array $data The new data to enter
@throws \Exception
Updates an existing row based on the passed identifier . If the necessary crud fields have not been identified in the child class this function will throw an exception .