Let me summarize what I learned ~ How to obtain the data primary key: $ goods_model-& gt; getPk (); two methods for instantiating a data table: newModel (); M () the shortcut method uses only one memory usage. The first method increases the memory storage capacity each time. query () to obtain the query results... "/> <scripttype =" text/plain Crip
Let me summarize what I learned ~
How to get the data primary key: $ goods_model-> getPk ();
Two ways to instantiate a data table: new Model (); M () Shortcut: the shortcut occupies only one memory, and the first method increases the memory storage each time.
Query () to obtain the query result execute () to obtain the number of affected rows
The D () method is used to obtain the user-defined model. the execution sequence of the D () function is to first find the user-defined model. when the file name and class name comply with the rules, the user-defined model is executed, if any, the table name is queried for instantiation. if the table name is not met, false is returned.
Coherent operation
Field () is the display range, where () is the value condition: Array or object is used as the condition, limit () is the number of values, order (para desc) is the sorting, group () for automatic sorting by field grouping, having () is another value condition. table (tbname) is a cross-table value, table (db. tbname) defines the array $ cont ['para'] = array ('like', '% a %') to generate an array conditional control SQL, sum () summation, avg () average, count () calculates the number