I'm from C++ background and newbie in php, somebody please help me with the difference between the two:
$totalupdatedrows = (count($rows) == 1 and !isset($rows[0]->updated_by)) ? 0 : count($rows);
$totalupdatedrows = count($rows) == 1 and !isset($rows[0]->updated_by) ? 0 : count($rows);
assume count($rows) = 1 and $rows[0]->updated_by=null. Please see that first one has only one extra wrapper parentheses.
I'm getting correct result from the first statement. I expect to get result of 0 which is the result of the first one and not the second one. I can't figure out the difference.