The thinkphp text filtering fields are all in the program code public & nbsp; function & nbsp; index () {$ Data & nbsp; M (zhaopin); & nbsp; & nbsp; instantiate the Data object import (ORG. util. page); & nbsp; import pagination class $ count & nbsp thinkphp text filter fields are all in a table
Program code
Public function index (){
$ Data = M ('zhaopin'); // instantiate a Data object
Import ('org. Util. page'); // import the paging class
$ Count = $ Data-> where ($ map)-> count (); // query the total number of records meeting the requirements
$ Page = new Page ($ count, 20); // The total number of incoming records in the instantiated Page class
$ NowPage = isset ($ _ GET ['P'])? $ _ GET ['P']: 1;
$ List = $ Data-> where ($ map)-> order ('shijian desc, id asc ')-> page ($ nowPage. ','. $ Page-> listRows)-> select ();
$ Show = $ Page-> show (); // display the output by Page
$ This-> assign ('count', $ count );
$ This-> assign ('page', $ show); // value-assigned paging output
$ This-> assign ('list', $ list); // assign a value to a dataset
$ This-> display (); // output Template
}
Filtering area
Recruitment position:
All
{$ Vo ['position']}
Region:
All Shenzhen
{$ Vo ['recruitment ']}
Content code
{$ Vo ['job'] | mb_substr = 0, 8, 'utf-8 '}
{$ Vo ['company _ name']}
{$ Vo ['recruitment ']}
{$ Vo ['shijian ']}
Recruitment: {$ vo ['hiring ']}
Company Nature: {$ vo ['natural']}
Scale: {$ vo ['company _ scale']} people
Experience: {$ vo ['work _ experience ']} years
Education Degree: {$ vo ['gree _ required']}
Monthly salary: {$ vo ['salary ']} RMB/month
Job requirements: {$ vo ['job _ requirements '] | mb_substr = 0,150, 'utf-8 '}
View position
------ Solution ----------------------
Public function index (){
$ Data = M ('zhaopin'); // instantiate a Data object
Import ('org. Util. page'); // import the paging class
$ Map = "1 = 1"; // initialize a condition variable
$ Position = $ this-> _ param ('position'); // receives the parameter
$ Recruitment = $ this-> _ param ('recruitment '); // receives parameters
If ($ Position <> ''){
$ Map. = "and Position = '$ position '";
}
If ($ Recruitment <> ''){
$ Map. = "and Recruitment = '$ Recruitment '";
}
$ Count = $ Data-> where ($ map)-> count (); // query the total number of records meeting the requirements
$ Page = new Page ($ count, 20); // The total number of incoming records in the instantiated Page class
$ NowPage = isset ($ _ GET ['P'])? $ _ GET ['P']: 1;
$ List = $ Data-> where ($ map)-> order ('shijian desc, id asc ')-> page ($ nowPage. ','. $ Page-> listRows)-> select ();
$ Show = $ Page-> show (); // display the output by Page
$ This-> assign ('count', $ count );
$ This-> assign ('page', $ show); // value-assigned paging output
$ This-> assign ('list', $ list); // assign a value to a dataset
$ This-> display (); // output Template
}
This is probably the case. let's see if it works.