On 23/09/15 11:40, Rowan Collins wrote: >> Using isset() in place of exists() is NOT a valid substitution since one >> can't then call is_null() KNOWING that the variable does exist. > > I think you're flogging a dead horse here. We all agree that isset() > does not check for variable existence. > > Also, calling both isset() and is_null() on the same variable is > entirely pointless, because they both make exactly the same check. "if ( > isset($foo) && is_null($foo) )" can be simplified to "if ( false )".
NOW WE AGREE ;) Simply because I DON'T want call 'isset() and is_null()' what *I* need is is_exist() which is the missing function. THEN either of the other is redundant, but neither replaces the check that the variable actually exists and it's that which prevents a clean program flow. >> we have hopefully established that the null state is a natural >> result of interaction with a database > > Indeed, I have never disputed that. A non-existent variable, however, is > not something I've ever come across in a database context - it would > seem to require a result set having rows with different numbers of columns. This is perfectly correct, but *IF* a column is included in the result set of a single row read - or not - is what we are talking about. If you read more rows YES they will have the same set of columns but there is nothing demanding that every column in the database is actually returned in every query? Only returning the subset needed for the job is perfectly sensible and there are a number of ways that can happen, some of which COULD bypass the result set associative array, but simply working off the returned array .. expanded ... in theory makes things easy. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php