How to use limit in thinkphp
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!