I got this code from this site and now I need to add some change.
I know I acted fool here.
I searched many and got stuck in here. I wanted to add 1 to the sql
You must do this, to get it running But it must be clear this is vulnurable to sql injection
So you must check TextBox4.Text for valid content.
Dim sql As String = "UPDATE attendance.student SET `" & TextBox4.Text & "` = `" & TextBox4.Text & "` +1 WHERE S_name = @name;”
Dim conn As MysqlConnection
Try conn = New MySqlConnection(ConnectionString)
Dim cmd As New MySqlCommand(sql, conn)
cmd.Parameters.Add(“@name”, MySqlDbType.VarString, 50).Value = TextBox1.Text