sql_select_ids passing an empty array binds params to previous values