I simply need to select the last entered row specified by condition, e.g:
SELECT ID from bugs WHERE user=Me
I need to return only the very
MySqlCommand insert_meal = new MySqlCommand("INSERT INTO meals_category(Id, Name, price, added_by, added_date) VALUES ('GTX-00145', 'Lunch', '23.55', 'User:Username', '2020-10-26')", conn);
if (insert_meal .ExecuteNonQuery() == 1)
{
long Last_inserted_id = insert_meal.LastInsertedId;
MessageBox.Show(msg, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Failed to save meal");
}