Youphp Learning and Finishing

Source: Internet
Author: User

1<?PHP2     //Background Public Module3 //_list Data Display4 //yourphp background-based operation notation5 //One, display data and search data6     7     /**8 * [_list display data list]9 * @param string $modelname [model name]Ten * @param array $map [conditions] One * @param string $sortBy [Sort by] A * @param boolean $ASC [default to reverse] - * @param integer $listRows [number of bars per page] - * @return [Type] [description] the      */ -     //function _list ($modelname, $map = ", $sortBy =", $asc = false, $listRows =) -     classDemoactionextendsadminbaseaction{ -          Public functionindex () { +             $map[' abc '] = ' demo '; -             $map[' cde '] = ' 123 '; +             $this->_list (Module_name,$map);//This can be used directly when the controller name is the same as the database table name A //When the Controller name and database table name are inconsistent at             $this->_list (' Demodb '); -             //when conditions are complex, we need to combine $map to -             $this-display (); -         } -          -         //Some pages do not need to take a search, then you can omit the index () method in          -}

Organize the background of the public module in the specific meaning of each method!

Youphp Learning and Finishing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.