Why is it so difficult to understand a complex function to getWebList (array ('web _ Show' => 1, 'Web _ page' => array ('like', $ web_page. '% ')));
------------- Beautiful split line -----------------
/**
* Read record list
*
* @ Param
* @ Return array returned results in array format
*/
Public function getWebList ($ condition = array ('web _ page' => 'index'), $ page = ''){
$ Result = $ this-> table ('web')-> where ($ condition)-> order ('web _ sort ')-> page ($ page) -> select ();
// Print_r ($ result );
Return $ result;
}
-------------- Gorgeous split line ----------------
The parameters corresponding to the above color cannot be understood, especially web_page '=> array ('like', $ web_page. '%') %, which is dizzy. what does the author want to express?
Reply to discussion (solution)
Array ('like', $ web_page. '%') does not appear in the code you post, so your problem is somewhat untitled.
However, in the form of arrays, this should be the parameter format encapsulated by ORDBMS and eventually translated into the linke 'xxxx % 'clause of the SQL command.