Issue with or_where
Issue with or_where
Hi,
I try to create a web site from a Postgresql view table.
The php request includes a or_where command in relation to a user.
->where( function ($q) use ($iansites) {
foreach($iansites as $tmp){
$q->or_where('view_union_current_adminlan_ruleset.ian_site', $tmp );
}
} )
->debug(true)
->process( $_POST )
->json();
$iansites is an array with about 40 values.
The web site will be shown correct but the search will not work.
It makes no differences which search possibilities I use.
It looks like the search will be performed because I got a new line at the bottom about the overall number of datassets but the number will also counts all datasets.
If the $iansites array only includes one value then the search is working correct.
This question has an accepted answers - jump to answer
Answers
Can you post the Ajax response please, with the debug present,
Colin
Hi Colin,
Can I forward the answer direkt to you?
I dont want to send the answer to a public chat and it looks like it is to long for the forum.
Thanks
Sure - if you could post the JSON and the table definition, then one of us will take a look. Send direct to me and I may add others into the conversation,
Colin
I suspect you'll need to use:
If that doesn't work, can you show me the JSON response from the server when you load your page?
Allan
Hello,
thanks that is the solution :-)