Thinkphp's custom model, coherent Operation Essentials _php tutorial

Source: Internet
Author: User
Let me summarize what I learned.
method to get the data primary key: $goods _model-GETPK ();
Instantiate a data table two methods new Model (); M () Shortcut method takes only one memory at a time and the first method increases memory storage every time
Query () Gets the result of the search execute () gets the number of rows affected
The D () method is used to get the custom model, the D () function is executed in order to find the custom model first when the file name and class name conform to the rule, execute the custom model, if there is a non-conforming lookup table name is instantiated, if not match the table name returns false

Consistent operation
Field () is the display range, where () is the value condition: with an array or an object as the condition, limit () is the number of values, order (para desc) is sorted, group () is automatically sorted by field grouping, having () another value condition, table ( Tbname) for cross-table values, table (db.tbname) takes values across the database, defines the array $cont[' para ']=array (' like ', '%a% '), generates an array condition control sql,sum () sum, avg () average, Count () to find the number

http://www.bkjia.com/PHPjc/477475.html www.bkjia.com true http://www.bkjia.com/PHPjc/477475.html techarticle Let me summarize what I've learned. method to get the data primary key: $goods _MODEL-GETPK (); Instantiate data table two methods new model (); The M () shortcut method uses only one memory at a time ...

  • Related Article

    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.