jeudi 10 mars 2016

Checking if SQLIte Result set Value is empty not working

I need to check if a value in the result set is empty.I use

 rs= get_result("SELECT * FROM sdata WHERE sid='%s';",sid);
 if(rs.recordset[0][5]!=NULL)
    {
        printf("good........................................\n");
         printf("---->%s\n",rs.recordset[0][5]);
         strcat(stbamount, rs.recordset[0][5]);
    }
    else
    {
         printf("nopeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
         strcat(stbamount, "0");
    }

But it always prints good and when i try using printf it prints nothing.

Aucun commentaire:

Enregistrer un commentaire