Hey..
I wonder what's the difference between the use of || and OR
I have an example:
$Assumed_Variable = 1;
$Assumed_Query = mysql_query("select something from someTable",$connection);
if($Assumed_Variable == 1 || mysql_num_rows($Assumed_Query) > 0){
echo 'Success!';
}
else{
echo 'Failure!';
}
So, if I understand this issue, this means that the code above will apparently print "Success!", but the parser will first look at the second part of the condition because the precedence is its.
However, have I put OR instead of ||, then the parser will check the first part of the condition, and, since it's true, it'll not look at the second part. And this way is faster because it won't take time using the function Mysql_num_rows().
Am I right in all of this?
Thank you.