search

Home  >  Q&A  >  body text

The PHP search code can only search for one page, but clicking on any page number does not work.

During fuzzy search, the required search information will be queried.

But only the first page can be seen. Click the next page or any page and the following picture will appear and return to the main page.

微信截图_20210513103643.png

The following is the search function code

//File search

public function dasousu0(){

if( session('USERNAME') == '){

#                                                                                                                                                                                                                                                                                                     through {

# Return "& LT; Script & GT;

Alert ('Please enter the search keyword!');

## Location.href = 'DANANGANLIST';

# #                                                                                                  gt;where('ifzztg' . ','%'.$sousu0.'%')

                                                                                           - >whereOr('tel','like','%'.$sousu0.'%')

                            ->whereOr('card','like','%'.$sousu0.' %')

-& gt; Order (' ID ASC ')-& GT; Paginate (20, FALSE, [' Query '= & GT; Request ()-& GT; Param ()];

$ page = $ list-& gt; render ();

## $ listcount = db ('userInfo')-& gt ('ifzztg', 0)

                        ->where('bianhao','like','%'.$sousu0.'%')

->whereOr('danwei','like','%'.$sousu0.'%')

                        ->whereOr('name','like','%'.$sousu0.'%')

                        ->whereOr('tel','like','%'.$sousu0.'%')

                        ->whereOr('card','like','%'.$sousu0.'%')->count();

                    $lb = '全部';

                    $qxid = session('QUANXIANID');

                    if($list){

                        return $this->fetch('dangan',['list'=>$list,'listcount'=>$listcount,'page'=>$page,'lb'=>$lb,'qxid'=>$qxid]);

                    }else{

                        return "<script>

                            alert('无记录!');

                            location.href='danganlist';

                        </script>";

                    }

                }  

            }

    }

各位大神,帮帮小白、、、、、

木木木木1348 days ago1628

reply all(2)I'll reply

  • 采县「vic」

    采县「vic」2021-06-24 08:59:24

    Print the input value to see if there is any data.

    reply
    0
  • 猪老湿

    猪老湿2021-05-14 13:53:37

    Check routing

    reply
    0
  • Cancelreply