So I am making an application that shows a viral video each day.It uses a MySQL database keep count on the views, I have a MySQL database with a column called video1_count with only 1 value. I want to know how to add to the current int not add new data I have a class called add user that I will use to execute the code how can I do this?
I did find this Post But for the life of me i could not get it to work.
i Tried this code :
MySqlConnection connect = new MySqlConnection(Connect_String);
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connect;
cmd.Connection.Open();
string commandLine = null;
string commmandLine = "UPDATE Youtube SET Video1_count = Video1_count + 1 ";
cmd.Set // (Recommended by a user) but cmd.set is not valid
cmd.Connection.Close();