当前位置:网站首页>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);
边栏推荐
- LeetCode_455_分发饼干
- [operation] Yan Yi (Internet new technology operation)
- WARNING: Your password has expired.Password change required but no TTY available.
- Element content must consist of character data or tags with correct format
- vim 笔记
- Use Preparedstatement to select and display recorded JDBC programs
- TwinCAT 3 first run error 4115
- 日期格式化
- Log slimming operation: from 5g to 1g!
- 可视化机房管理
猜你喜欢
随机推荐
12 pictures +6k figure ZGC garbage collector and tuning skills
Static distribution and dynamic distribution in trust
Trust sums two numbers
leetcode刷题:动态规划04(不同路径)
Visualization of network infrastructure
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
Start multiple redis instances on a Linux machine
Trust guessing numbers game
IDEA Download Sources报错 Connection refused的解决方法
Redis分布式锁,没它真不行
LeetCode_ Dynamic programming_ Medium_ 120. Triangle minimum path sum
Literature learning (part100) -- an introduction to autoencoders
Console calculator developed based on C language
Rust中的函数function与方法method的区别
基于OpenPGP的文件管理系统
从马尔可夫链到GPT,字节跳动AI Lab总监李航细说语言模型的前世今生
Redis distributed lock, it's really impossible without it
卷积核越大性能越强?一文解读RepLKNet模型
KV260单板PS控制设置IIC开关芯片
[JS] check whether the date object is invalid date







