Fixes unknown column error in mysql