Why does order matter with this if else if statement?
if((row1 = mysql_fetch_row(result1)) && adding_to_member_flag != 1)
{
printf("Do not update date since it already exists\n");
}
else if(!(row1 = mysql_fetch_row(result1)) && adding_to_member_flag != 1)
{
printf("Update end_date and add new team\n");
}
When I had it like this the "Do not update date since it already exists" never got printed.
if(!(row1 = mysql_fetch_row(result1)) && adding_to_member_flag != 1)
{
printf("Update end_date and add new team\n");
}
else if((row1 = mysql_fetch_row(result1)) && adding_to_member_flag != 1)
{
printf("Do not update date since it already exists\n");
}