Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How tp5 updates fields

Shulou Source: shulou.com Published: 2022-06-02 04:41:35 10月03日 Update

This article mainly introduces "the way tp5 updates fields". In the daily operation, I believe that many people have doubts about the way tp5 updates fields. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to update fields by tp5". Next, please follow the editor to study!

High version

$test_int = 1 db dump (db ('member')-> field (' uid,login_num,groupid')-> where ('uid',16)-> find ()); $result = db (' member')-> where ('uid',16)-> update ([' login_num'= > Db::raw ("login_num+$test_int"), 'groupid'= > Db::raw ("groupid-$test_int")); dump ($result) Dd (db ('member')-> field (' uid,login_num,groupid')-> where ('uid',16)-> find ())

Lower version

At this point, the study on "how tp5 updates fields" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Fields methods updates learning more versions help practical next articles methods theories knowledge articles websites materials follow questions easy to use practice Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Docker Shulou Technology macOS