Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use limit in thinkphp

Shulou Source: shulou.com Published: 2022-06-03 17:42:35 11月13日 Update

This article mainly introduces how to use limit in thinkphp, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Description

Limit is mainly used to specify the number of queries and operations

Example

Limit the result

Db::table ('think_user')-> where (' status=1')-> field ('id,name')-> limit (10)-> select ()

Update eligible records

Db::table ('think_user')-> where (' score=100')-> limit (3)-> update (['level'= >' A'])

Paging query

Db::table ('think_article')-> limit (' 10Magne25')-> select (); Db::table ('think_article')-> limit (10Magne25)-> select (); Thank you for reading this article carefully. I hope the article "how to use limit in thinkphp" shared by the editor will be helpful to you. At the same time, I also hope you will support us, pay attention to the industry information channel, and more related knowledge is waiting for you to learn!

Tags: Articles queries values interests simultaneous quantity more friends conditions knowledge examples results editing industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker MySQL Huawei Shulou Tech Info