Click here to Skip to main content
15,916,945 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Is this returning a zero if a match isn't found? If not then how would I do that?

C++
sprintf(queryString, "SELECT COUNT(*) FROM tblURLIP WHERE IP = '%s' AND IPStatus = '1' AND IPMax = '0' AND  IPType = 3", ipSrc);
Posted

1 solution

IF the Select count(*) results in 0 rows because the where clause does not lead to results, you will get 0 as answer.
 
Share this answer
 
Comments
Member 7766180 15-Sep-11 17:07pm    
Thank you very much! Deep in the weeds here!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900