{"action":"created","issue":{"url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/60","labels_url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/60/comments","events_url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/60/events","html_url":"https://github.com/IgnitedDatatables/Ignited-Datatables/pull/60","id":37225795,"number":60,"title":"Added Individual column filtering","user":{"login":"RodolfoSilva","id":1703020,"avatar_url":"https://avatars.githubusercontent.com/u/1703020?v=3","gravatar_id":"","url":"https://api.github.com/users/RodolfoSilva","html_url":"https://github.com/RodolfoSilva","followers_url":"https://api.github.com/users/RodolfoSilva/followers","following_url":"https://api.github.com/users/RodolfoSilva/following{/other_user}","gists_url":"https://api.github.com/users/RodolfoSilva/gists{/gist_id}","starred_url":"https://api.github.com/users/RodolfoSilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RodolfoSilva/subscriptions","organizations_url":"https://api.github.com/users/RodolfoSilva/orgs","repos_url":"https://api.github.com/users/RodolfoSilva/repos","events_url":"https://api.github.com/users/RodolfoSilva/events{/privacy}","received_events_url":"https://api.github.com/users/RodolfoSilva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-07-06T19:27:52Z","updated_at":"2015-03-20T15:10:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/pulls/60","html_url":"https://github.com/IgnitedDatatables/Ignited-Datatables/pull/60","diff_url":"https://github.com/IgnitedDatatables/Ignited-Datatables/pull/60.diff","patch_url":"https://github.com/IgnitedDatatables/Ignited-Datatables/pull/60.patch"},"body":"Based on: \r\n\r\nhttp://www.datatables.net/examples/api/multi_filter.html\r\nhttp://www.datatables.net/development/server-side/php_mysqli\r\n\r\nI added the option to filter individual columns."},"comment":{"url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/comments/84039687","html_url":"https://github.com/IgnitedDatatables/Ignited-Datatables/pull/60#issuecomment-84039687","issue_url":"https://api.github.com/repos/IgnitedDatatables/Ignited-Datatables/issues/60","id":84039687,"user":{"login":"kidox","id":5457704,"avatar_url":"https://avatars.githubusercontent.com/u/5457704?v=3","gravatar_id":"","url":"https://api.github.com/users/kidox","html_url":"https://github.com/kidox","followers_url":"https://api.github.com/users/kidox/followers","following_url":"https://api.github.com/users/kidox/following{/other_user}","gists_url":"https://api.github.com/users/kidox/gists{/gist_id}","starred_url":"https://api.github.com/users/kidox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidox/subscriptions","organizations_url":"https://api.github.com/users/kidox/orgs","repos_url":"https://api.github.com/users/kidox/repos","events_url":"https://api.github.com/users/kidox/events{/privacy}","received_events_url":"https://api.github.com/users/kidox/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T15:10:24Z","updated_at":"2015-03-20T15:10:24Z","body":"Hi,\r\n\r\nlouisl's method work a few with the last version of Datatbles but not quite well.\r\nChanging ```$this->ci->db->where``` by ```$this->ci->db->like``` improves it a little bit, like you don't need to enter the exact word to find some results. However, this function doesn't work well with formatted sql selects.\r\n\r\nAnd RodolfoSilva's solution isn't working in the last version of Datatables.\r\n\r\nHere I come with a solution that works perfectly well combining a little of two methods:\r\n\r\n```php\r\n$individual = '';\r\nfor($i = 0; $i < count($mColArray); $i++) {\r\n if ($mColArray[$i]['searchable'] == 'true' && isset($mColArray[$i]['search']['value']) && $mColArray[$i]['search']['value'] != '') {\r\n  if ($this->check_cType()) {\r\n   $individual .= $this->select[$mColArray[$i]['data']] . \" LIKE '%\" . $mColArray[$i]['search']['value'] . \"%' AND \";\r\n  } else {\r\n   $individual .= $this->select[$this->columns[$i]] . \" LIKE '%\" . $mColArray[$i]['search']['value'] . \"%' AND \"; \r\n  }\r\n }\r\n}\r\n\r\n$individual = substr_replace($individual, '', -4);\r\n if($individual != '')\r\n  $this->ci->db->where('(' . $individual . ')');\r\n```"}}