Having trouble getting this code to print what I need it to print. I have a Drop Down list that lets the user select what they want the table to be sorted as. Im getting that Value and binding it to the Parameter '@param'. It is not putting the items of the table in the correct order.
NOTE: when I change the 'string sql' to a value that is in my Drop down list it works fine.
string sql = "Select * from yeet order by @param desc;";
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd.Prepare();
cmd.Parameters.AddWithValue("@param", DropTopWop.SelectedValue.ToString());
MySqlDataReader reader = cmd.ExecuteReader();