Tag:tp5.1

  • Example summary of advanced query skills in tp5.1 framework database

    Time:2020-9-28

    This paper describes the advanced query skills of tp5.1 framework database. For your reference, the details are as follows: Quick query The shortcut isA multi field identical query conditionThis method can further simplify the writing of query conditions|Split representationORQuery with&Split representationANDQuery, you can implement the following queries, for example: Db::table(‘think_user’) ->where(‘name|title’,’like’,’thinkphp%’) ->where(‘create_time&update_time’,’>’,0) ->find(); The generated […]

  • Explanation of tp5.1 frame query expression usage

    Time:2020-9-27

    This paper describes the usage of tp5.1 framework query expression. For your reference, the details are as follows: Query expression Query expressions support most of the SQL query syntax, as wellThinkPHPThe essence of query language, the format of query expression: Where (‘field name ‘,’ expression ‘,’ query condition ‘); Where or (‘field name ‘,’ expression […]

  • Tp5.1 framework database common operation details [add, delete, update, query]

    Time:2020-9-25

    This paper describes the common operations of tp5.1 framework database. For your reference, the details are as follows: Tp5.1 — database add operation useDb ClassinsertMethods submit data to the database $data = [‘foo’ => ‘bar’, ‘bar’ => ‘foo’]; Db::name(‘user’)->insert($data); insertMethod returns the number of successfully added data. Normally, it returns 1 Or usedataMethod coordinationinsertuse. $data […]

  • Analysis of sub query operation example in tp5.1 framework database

    Time:2020-9-24

    This paper describes the sub query operation of tp5.1 framework database. For your reference, the details are as follows: First, construct the subquery SQL. You can use the following three ways to build a subquery. Using the fetchsql method The fetchsql method represents that it does not query, but only returns the built SQL statement, […]

  • Example analysis of tp5.1 framework join method usage

    Time:2020-9-23

    This paper describes the usage of join method in tp5.1 framework. For your reference, the details are as follows: JOINMethod is used to query data from two or more tables based on the relationship between the columns in those tables. Join usually has the following types. Different types of join operations will affect the returned […]

  • Tp5.1 framework routing operation URL generation example analysis

    Time:2020-9-22

    This paper describes the tp5.1 framework routing operation URL generation. For your reference, the details are as follows: ThinkPHP supports the unified generation of routing URL address, supports all routing methods, and perfectly solves the reverse resolution of routing address, without changing the URL generation for route definition and change. If you enable routing delay […]

  • Tp5.1 framework database dataset operation example analysis

    Time:2020-9-20

    This paper describes the tp5.1 framework database dataset operation. For your reference, the details are as follows: The query result of the database is the dataset. By default, the type of the dataset is a two-dimensional array. We can configure it as a dataset class to support more object-oriented operations on the dataset. We need […]