title: How Convert byte[] to varchar?
body: <pre><code>SELECT Trainer.id AS idTrainer, surname, lastname, name,  
  if(month = '', 'NO',month) as monthT, quarter, halfyear, year, id_Person, photo
  FROM Trainer, Person
  WHERE Trainer.id_Person = Person.id
  </code></pre>
  
  <p><code>if(month = '', 'NO',month) as monthT</code> in phpmyadmin return good or 'no' or month</p>
  
  <p>In a C# returns <code>byte[]</code>, but I need return <code>NO</code> if month is empty or else return the <code>month</code>.</p>
  
  <p>My C# code looks like this:</p>
  
  <pre><code>string sql = @" SELECT Trainer.id AS idTrainer, surname, lastname, name,  if(month = '', 'NO',month) as monthT, quarter, halfyear, year, id_Person, photo
                  FROM Trainer, Person
                  WHERE Trainer.id_Person = Person.id";
  using (MySqlConnection connection = ConnectToDataBase.GetConnection())
  {
      MySqlCommand command = new MySqlCommand(sql, connection);
      MySqlDataAdapter adapter = new MySqlDataAdapter();
  
      connection.Open();
      adapter.SelectCommand = command;
  }
  </code></pre>