If you print the query that is about to insert it will probably look like this:
INSERT INTO table
(phone,fax)
VALUES
(5551234,)
obviously this is bad syntax.
One solution would be to use PHP to check for empty phone/fax values and replace empty values with 0 (zero) Then in the code that displays it you can replace a single zero with an empty string or 'none' or 'n/a'.
Another solution which is more complex, would be to actually build the sql statement dynamically,
so you'd only add fields to the statement if those fields have values:
INSERT INTO table
(phone)
VALUES
(5551234)