php

判断这个值是否在函数内

$allowedIds = [41, 67, 95, 96];

in_array(95,$allowedIds)

从数组中提取某一列的值

$ids = array_column($items, 'id');

时间处理

//获取当前时间的分
date('i', time());
//获取当前时间的30分的时间戳
$bbb = strtotime(date('Y-m-d H:30:00', time()));

centos

查看单个目录

du -h -d 0 /server/srs

下载依赖

composer require

常用mysql语句

-- 清除表内容
-- TRUNCATE TABLE tennisSys_device_purview;

-- 查询表内容中符合条件的数据id
-- SELECT id FROM tennisSys_court_booking_reserve WHERE court_id = 3;

-- 查询表内容中符合条件的数据,并且把指定字段内容改为3
-- UPDATE tennisSys_order SET court_id = 3 WHERE reserve_id IN (11, 12, 13, 14, 20, 30, 52, 198);

-- 硬删除表中符合条件的数据
--  DELETE FROM tennisSys_court_booking_reserve WHERE court_id IN (4, 5, 6, 7, 8);
最后修改:2024 年 10 月 17 日
如果觉得我的文章对你有用,请随意赞赏