Reputation: 2061
im using the MySQL Connector C++ library and want to check if a query is empty. Ive trief it like this:
res = stmt->executeQuery("select max(date) from tab");
if(res->next() == false )
printf("empty! =? %s\n", res->getString(1).c_str() );
this wont work. The table is empty and the if statement is always true.
Upvotes: 0
Views: 746