set $options optionnal and fix bugs in getResultByColumn