first off...
in an if statement:
if(x = 1)
if(x == 1)
second (assuming the rest of your code is kosher, i'm pretending it is)...
you have to look up what MYSQL_ROW is typedef'ed from, if its an int, then a comparator should work, but if you need to cast it, you need to do an explicit cast (usually if you have to do this you should know what you're doing as far as data types, could lead to crashes, bugs, or loss of data):
MYSQL_ROW row;
int x= (int) row;
if(x == row)
if(x == (int)row)
I'd help you more with the SQL portion of it but its been years since I last did SQL.
*****Update:*****
int value;
int row[10];
if(row == 1)
if(row[2] == 1)