How to know the last record of the ID in the table and play the number in a textblock?
using (_connection = new MySqlConnection("Database=test;Data Source=localhost;User Id=root;Password=teste;SslMode=None;"))
{
System.Text.EncodingProvider ppp;
ppp = System.Text.CodePagesEncodingProvider.Instance;
Encoding.RegisterProvider(ppp);
_connection.Open();
var cmd = new MySqlCommand("SELECT ???? FROM user", _connection);
using (var reader = cmd.ExecuteReader())
{
if (reader.Read())
{
textBlock.Text = (reader.GetString("id"));
}
}
}