I thought this would be easy, but I can't make it work:
Table=(int,int,text)
NpgsqlCommand command = new NpgsqlCommand("select * from database_data ncd inner join players p on p.player_id = ncd.player_id where p.playername ='Name1', conn);
string _data = (String)command.ExecuteScalar();
now I got the data....NOW I just wanna write it back...but...
NpgsqlCommand command2 = new NpgsqlCommand("Update database_data ncd inner join players p on p.player_id = ncd.player_id where p.playername ='Name2' + "'", conn);
command2.Parameters.Add(?????)
command2.ExecuteNonQuery();
I only managed to update the whole row.
NpgsqlCommand command2 = new NpgsqlCommand("insert into database_data values(1,2222,3333)", conn);
command2.ExecuteNonQuery();
conn.Close();
This works nicely, but I cannot combine it with the join and where.
If join doesn't work, I can simply work with where player_id=x
and get the player_id somewhere else.