On 18/09/15 12:38, Lester Caine wrote:
> Forget enum and more than three values in a variable ...
> 
> For SQL data coming from any decent database each variable can either
> have a value in, ( which may be an empty string ) or be NULL. The NUMBER
> of fields returned does not matter, a query returning a single record
> can have a variable so the third condition is that rather than a field
variable NUMBER OF FIELDS so

> being NULL, it does not exist, so testing for isset() only works for a
> field that 'is set' and empty() only works with an empty value. Checking
> for the field being present but NULL needs is_null() but THAT throws a
> notice for those fields which have not been returned in this particular
> result set. And one scenario here is that the database scheme actually
> needs updating - but that should be handled differently - however a
> system may have picked up an old copy of the data by mistake and the
> missing fields need handling cleanly.
> 
> We are not talking about the number of states stored IN a variable, but
> just what a variables own states are. Adding another variable to
> enumerate what say 'a date relates to' is a different matter. The date
> value can be a valid date ( and genealogical date goes back before most
> 'empty' date values ) or NULL indicating no date set OR the variable can
> be missing from the result set. If you add in 'empty' one might say we
> have for distinct states?
FOUR distinct states

( and date is a good example here since 'empty' on something like MySQL
is a valid date genealogically )

-- 
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

Reply via email to