Learned some crazy stuff about PDO and MySQL today.

Implemented IFNULL ( expression, value ) to return the value 0 when the result set is null, even if the SQL is valid.

This did not work on the join between fac_Device and fac_Cabinet with conditionals.  Not sure why, don't know if I'll ever know why.  It kept erroring out the IF conditional on assigning the column value to a variable, so I separated the query() from the fetchColumn() statements and all is well.

Fixes #229