diff --git a/application/libraries/Grocery_CRUD.php b/application/libraries/Grocery_CRUD.php index 2025526b..223a52f5 100755 --- a/application/libraries/Grocery_CRUD.php +++ b/application/libraries/Grocery_CRUD.php @@ -645,6 +645,7 @@ protected function set_ajax_list_queries($state_info = null) $this->basic_model->having($where[0],$where[1],$where[2]); $temp_where_query_array = []; + $basic_table = $this->get_table(); foreach($columns as $column) { @@ -673,7 +674,7 @@ protected function set_ajax_list_queries($state_info = null) !in_array($field_types[$column->field_name]->type, array('date', 'datetime', 'timestamp')) ) { $escaped_text = $this->basic_model->escape_str($search_text); - $temp_where_query_array[] = $column->field_name . ' LIKE \'%' . $escaped_text . '%\''; + $temp_where_query_array[] = '`' . $basic_table . '`.' . $column->field_name . ' LIKE \'%' . $escaped_text . '%\''; } } @@ -2194,8 +2195,10 @@ protected function get_layout() } elseif($this->echo_and_die === true) { - echo $this->views_as_string; - die(); + return (object)array( + 'isAjax' => true, + 'output' => $this->views_as_string, + ); } } diff --git a/change_log.txt b/change_log.txt index 9cf5371a..09a20f45 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,5 @@ v 1.6.0 + - #211: Bug if use where clause and try to "search all" the fields - #432: Bootstrap Theme issues with filtering when we are using set_relation with multiple fields - #353: Adding callback_read_field function - #433: Preview click with fancybox to work the same across all the themes