Skip to content

Commit

Permalink
fix orlike
Browse files Browse the repository at this point in the history
  • Loading branch information
monkenWu authored Apr 19, 2020
1 parent 9382d23 commit c8114e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/TablesIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ private function getOutputData($row){
*/
private function extraConfig($bui){
if(!empty($_POST["search"]["value"])){
foreach ($this->searchLike as $field) {
$bui->orLike($field,$_POST["search"]["value"]);
foreach ($this->searchLike as $key => $field) {
if($key == 0){
$bui->like($field,$_POST["search"]["value"]);
}else{
$bui->orLike($field,$_POST["search"]["value"]);
}
}
}
if(isset($_POST["order"])){
Expand Down

0 comments on commit c8114e6

Please sign in to comment.