I wrote this code :
MySqlCommand command1 = new MySqlCommand("SELECT SUM(standard_one) FROM `challenge` WHERE (SELECT DAYOFWEEK(date)=1) AND challenge_id = @challenge_id and username = @username", db.getConnection());
command1.Parameters.Add("@challenge_id", MySqlDbType.Int32).Value = comboBox1.SelectedItem;
command1.Parameters.Add("@username", MySqlDbType.VarChar).Value = globals.username;
the problem is some times this command returns null.
how can I check if the command will return null? and if so it returns 0?