当前位置:网站首页>TP & smart use diary
TP & smart use diary
2022-07-23 17:49:00 【Ideal coder】
stay smarty Make the timestamp mature / month / Day format :
{$v.goods_create_time|date_format:"%Y-%m-%d %H:%M:%S"}
stay tp Get constants that can be used provided by the system :
get_defined_constants(true);
Database operation :
creat() Method
//add() Method to add records using the array method
$user = new M('user');
$arr = array(
'field1' => 'v1',
'field2' => 'v2',
'field3' => 'v3',
);
$user->add($arr);
create() Method
if(isset($_POST)){
$user = new M('user');
$user->create();
$user->add();
}
save() Method
$user = new M('user');
$arr = array(
'field1' => 'v1',
'field2' => 'v2',
'field3' => 'v3',
);
$user->save($arr);
// No conditions set , Talk about modifying all records in the database ,tp The framework should not allow this
// You can set where() Conditions
// Such as :
//$user->where("goods_price>1000")->save($arr);
边栏推荐
- Create a flow using flow builder in kotlin
- rust中的静态分发和动态分发
- KV260单板PS控制设置IIC开关芯片
- @Bean 注解的方法调用多次会创建多个bean 实例吗
- Analyze optimism replay contract address attack events
- 活动报名:如何零基础快速上手开源的 Tapdata Live Data Platform?
- Do you dare to use BigDecimal without mastering these pits?
- LeetCode_ 455_ Distribute cookies
- Solution to connection rejected error in idea download sources
- isEmpty 和 isBlank 的用法区别,至少一半的人答不上来...
猜你喜欢

你真的了解Redis的持久化机制吗?

isEmpty 和 isBlank 的用法区别,至少一半的人答不上来...

rust求数组中最大值

sns_ sensor_ instance_ api

MySQL7种JOIN(图)

为啥一问 JVM 就 懵B ???

File management system based on OpenPGP
![[operation] Yan Yi (Internet new technology operation)](/img/7a/38c7a9ed79e626506de067f360384c.png)
[operation] Yan Yi (Internet new technology operation)

Differences between nvisual generic cabling management software and network management software

基于策略路由部署的网络多出口设计研究与实现
随机推荐
非继承多态思路配合typeid实现不同参数的传递
Trust sums two numbers
单细胞论文记录(part19)--A comprehensive comparison on cell-type composition inference for ST data
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
WSUS can patch MySQL Middleware_ Join the WSUS patch server and download the patch
TwinCAT 3 first run error 4115
TYPE-C 转OTG(USB2.0传输数据)+PD充电协议芯片 乐得瑞LDR6028/LDR6023SS
Emgu cv3+c # image processing (IV): use emgucv to obtain camera and read video
tp&smarty使用日记
File management system based on OpenPGP
一台Linux机器上启动多个redis实例
xlinx pcie xvc
Rust中的dyn关键字
leetcode刷题:动态规划04(不同路径)
[operation] Yan Yi (Internet new technology operation)
keyup.native在el-input中的使用
为啥一问 JVM 就 懵B ???
MySQL field modification
LeetCode_455_分发饼干
Trust counts the number of occurrences of words in the file