i wonder that both if and it's else are true.
i got $apple_id_num from the input select form and it is a number but in string type like "7" and it is how many ids that user wants.so i convert it to integer
now i want to check if it is not more that what i have available in my database.
but statements under conditions ($num_rows<$id_num)
and if ($num_rows>=$id_num)
both are running.
what i'm doin wrong?
here is my code:
function getAppleID($apple_id_num)
{
$sqli=new mysqlii();
$apple_ids=$sqli->SelectFromDB($apple_id_num);
$num_rows=$sqli->num_rows;
$id_num=(int)$apple_id_num;
if ($num_rows>=$id_num){
$this->printAppleID($apple_ids,$num_rows);
//$sqli->updateRows();
echo"else if running";
return $apple_id_num;
} else if ($num_rows<$id_num)
echo "if statement was rungning";
}