thinkphp5 has a sql statement that will be modified if it exists or created if it does not exist.
为情所困
为情所困 2017-06-21 10:11:31
0
3
1071

If you use native functions, you have to make repeated judgments every time before taking the route that doesn't work. I wonder if thinkphp5 has any convenient and quick statements.

I also checked the manual and didn’t see any relevant content. Could you please give me some guidance

为情所困
为情所困

reply all(3)
滿天的星座

Execute original mysql statement

db("table")->execute("replace into table(id, name) values(9, 2)");
三叔

I personally think that no matter what framework and language, you must first determine whether it exists, and then operate based on the judgment results. The framework only makes it easier for you to judge whether it exists, but you still have to make a judgment in the end.

ringa_lee

No, you can write one yourself

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template