Fix PHP warning when no columns are selected in table