Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having problem regarding whereClauseArray() #27

Open
takerukimura opened this issue Jun 23, 2016 · 1 comment
Open

Having problem regarding whereClauseArray() #27

takerukimura opened this issue Jun 23, 2016 · 1 comment

Comments

@takerukimura
Copy link

Hi Zepernick,

Im having problem regarding whereClauseArray() function. What I want to do is using where clause to find event_id = $_GET['id]. So I wrote like this :
public function whereClauseArray(){ $conditions = array(); $conditions['event_id ='] = $this->input->get('id'); return $conditions; }
But it can't find any data. If I do like this :
public function whereClauseArray(){ $conditions = array(); $conditions['event_id ='] = 5; return $conditions; }
The data will come out. Is there any specific method to using value from $_GET ?

@FayazK
Copy link

FayazK commented Aug 12, 2016

Hi,
As we call that class via ajax so you have to pass url query args with the URL you are calling AJAx

let say posts is your controller and there is a method doajax where your DataTable logic is
so you are calling
http://someone.com/posts/doajax

in the jquery of your DataTable.

Now the magic is here. you have to pass the $_GET args here like
http://someone.com/posts/doajax?id=1

Hope it will help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants