Paul's Programming Notes     Archive     Feed     Github

IFNULL - MySQL

IFNULL(`field1`, `field2`)

That returns field1 if it's not null. However, it will return field2 if it is null.