On 22 Feb 2010, at 18:16, Joseph Scott wrote: > So wouldn't this be the same: > > SELECT hans.this, hans.that, COALESCE(frans.the, 'default value') as other > FROM database_hans hans > LEFT JOIN database_frans frans > ON hans.fk=frans.pk > > > Since COALESCE will return the first non-null item in the list given > to it. If frans.the is not null then it will be used, and if it is > null then you'll get back 'default value' since that string will never > be null.
Ah, yes it would. Thanks for the example. That's not how I understood it working from my quick read in the manual. I thought that all the values had to be database columns. _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
