> You might even be able to convert EMPTY(X) to COALESCE(X, '') = ''.
> MySQL seems to be pretty forgiving with its implicit type-casting.

Hmm... The new system I've written properly handles the datatype and
EMPTY... So this would be a hack to much around with regexs to replace
EMPTY in customer built selects.

Now I fiddled around with this on 5.1.33-community on Windows and I
get the following odd results...

select coalesce(0,"")=0,coalesce("","")=0,coalesce(0,"")=0,coalesce("","")=0;
returns 1, 1, 1, 1

but...

 select 
coalesce(0,"")="",coalesce("","")="",coalesce(0,"")="",coalesce("","")="";
returns 0, 1, 0, 1

Which implies that in certain circumstances "" = 0 but 0 != "" (unless
I'm missing something).

Either way it looks like I can use coalesce(X,"")=0 which should be useful!

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to