mardi 15 décembre 2015

Else part can't got executed

I am working on some database related task and used if..else as follows :

if (mDBHelper.totalItems() > 0) {
    //code to be executed
}else{
    //code to be executed
}

Here, I am getting total number of records from database using mDBHelper.totalItems().

Now, by doing this my if part is executing while i got the number of records more than 0. The Problem is that my else part is not executing even if i got the number of records 0.

Aucun commentaire:

Enregistrer un commentaire