#115
展开↯#116
作者:广西南宁市
package main
import (
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"runtime"
"time"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/text/gstr"
"github.com/lxn/walk"
)
const ntpEpochOffset = 2208988800
type packet struct {
Settings uint8
Stratum uint8
Poll int8
Precision int8
RootDelay uint32
RootDispersion uint32
ReferenceID uint32
RefTimeSec uint32
RefTimeFrac uint32
OrigTimeSec uint32
OrigTimeFrac uint32
RxTimeSec uint32
RxTimeFrac uint32
TxTimeSec uint32
TxTimeFrac uint32
}
func main() {
var timeLayoutStr = "2006-01-02 15:04:05"
ntime := getremotetime()
ts := ntime.Format(timeLayoutStr) //time转string
fmt.Print(ts)
// 2021-08-29 15:53:35.922579627 +0800 CST
UpdateSystemDate(ts)
}
func getremotetime() time.Time {
var host string
// 182.92.12.11:123 是阿里的ntp服务器,可以换成其他域名的
flag.StringVar(&host, "e", "ntp.aliyun.com:123", "NTP host")
flag.Parse()
conn, err := net.Dial("udp", host)
if err != nil {
log.Fatalf("failed to connect: %v", err)
}
defer conn.Close()
if err := conn.SetDeadline(time.Now().Add(15 * time.Second)); err != nil {
log.Fatalf("failed to set deadline: %v", err)
}
req := &packet{Settings: 0x1B}
if err := binary.Write(conn, binary.BigEndian, req); err != nil {
log.Fatalf("failed to send request: %v", err)
}
rsp := &packet{}
if err := binary.Read(conn, binary.BigEndian, rsp); err != nil {
log.Fatalf("failed to read server response: %v", err)
}
secs := float64(rsp.TxTimeSec) - ntpEpochOffset
nanos := (int64(rsp.TxTimeFrac) * 1e9) >> 32
showtime := time.Unix(int64(secs), nanos)
return showtime
}
func UpdateSystemDate(dateTime string) bool {
system := runtime.GOOS
switch system {
case "windows":
{
_, err1 := gproc.ShellExec(`date ` + gstr.Split(dateTime, " ")[0])
_, err2 := gproc.ShellExec(`time ` + gstr.Split(dateTime, " ")[1])
if err1 != nil && err2 != nil {
glog.Info("更新系统时间错误:请用管理员身份启动程序!")
walk.MsgBox(nil, "出错啦!!!", "更新系统时间错误,请右键,选择以管理员身份运行程序!", walk.MsgBoxIconInformation)
return false
}
return true
}
case "linux":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
case "darwin":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
}
return false
}
Run code
Cut to clipboard
文章:golang 获取NTP服务器时间并自动设置 发表时间:2023-03-31, 02:55:45
#117
作者:广西南宁市
go 修改操作系统时间
https://www.cnblogs.com/Kingram/p/12627709.html
go 作为 ntp 客户端接收时间
https://github.com/vladimirvivien/go-ntp-client/blob/master/time.go
时间格式化
https://www.cnblogs.com/-xuzhankun/p/10812048.html
package main
import (
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"runtime"
"time"
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/text/gstr"
)
const ntpEpochOffset = 2208988800
type packet struct {
Settings uint8
Stratum uint8
Poll int8
Precision int8
RootDelay uint32
RootDispersion uint32
ReferenceID uint32
RefTimeSec uint32
RefTimeFrac uint32
OrigTimeSec uint32
OrigTimeFrac uint32
RxTimeSec uint32
RxTimeFrac uint32
TxTimeSec uint32
TxTimeFrac uint32
}
func main() {
var timeLayoutStr = "2006-01-02 15:04:05"
ntime := getremotetime()
ts := ntime.Format(timeLayoutStr) //time转string
fmt.Print(ts)
// 2021-08-29 15:53:35.922579627 +0800 CST
UpdateSystemDate(ts)
}
func getremotetime() time.Time {
var host string
// 182.92.12.11:123 是阿里的ntp服务器,可以换成其他域名的
flag.StringVar(&host, "e", "time.windows.com:123", "NTP host")
flag.Parse()
conn, err := net.Dial("udp", host)
if err != nil {
log.Fatalf("failed to connect: %v", err)
}
defer conn.Close()
if err := conn.SetDeadline(time.Now().Add(15 * time.Second)); err != nil {
log.Fatalf("failed to set deadline: %v", err)
}
req := &packet{Settings: 0x1B}
if err := binary.Write(conn, binary.BigEndian, req); err != nil {
log.Fatalf("failed to send request: %v", err)
}
rsp := &packet{}
if err := binary.Read(conn, binary.BigEndian, rsp); err != nil {
log.Fatalf("failed to read server response: %v", err)
}
secs := float64(rsp.TxTimeSec) - ntpEpochOffset
nanos := (int64(rsp.TxTimeFrac) * 1e9) >> 32
showtime := time.Unix(int64(secs), nanos)
return showtime
}
func UpdateSystemDate(dateTime string) bool {
system := runtime.GOOS
switch system {
case "windows":
{
_, err1 := gproc.ShellExec(`date ` + gstr.Split(dateTime, " ")[0])
_, err2 := gproc.ShellExec(`time ` + gstr.Split(dateTime, " ")[1])
if err1 != nil && err2 != nil {
glog.Info("更新系统时间错误:请用管理员身份启动程序!")
return false
}
return true
}
case "linux":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
case "darwin":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
}
return false
}
Run code
Cut to clipboard
文章:golang 获取NTP服务器时间并自动设置 发表时间:2023-03-31, 02:54:28
#118
作者:广西南宁市
package main
import (
"github.com/gogf/gf/os/glog"
"github.com/gogf/gf/os/gproc"
"github.com/gogf/gf/text/gstr"
"runtime"
)
func main() {
UpdateSystemDate("2020-03-20 15:02:41.372")
}
func UpdateSystemDate(dateTime string) bool {
system := runtime.GOOS
switch system {
case "windows":
{
_, err1 := gproc.ShellExec(`date ` + gstr.Split(dateTime, " ")[0])
_, err2 := gproc.ShellExec(`time ` + gstr.Split(dateTime, " ")[1])
if err1 != nil && err2 != nil {
glog.Info("更新系统时间错误:请用管理员身份启动程序!")
return false
}
return true
}
case "linux":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
case "darwin":
{
_, err1 := gproc.ShellExec(`date -s "` + dateTime + `"`)
if err1 != nil {
glog.Info("更新系统时间错误:", err1.Error())
return false
}
return true
}
}
return false
}
Run code
Cut to clipboard
文章:golang 获取NTP服务器时间并自动设置 发表时间:2023-03-31, 02:54:07
#119
作者:广西南宁市
Golang-设置系统时间
// 接收UDP时间广播,并设置系统时间
func (sl *Slaver) masTimeSync(ch chan int) {
// 开始监听广播时间
log.Printf("time sync listen [%s]", sl.Node.Port.PortUdpSlaTimeSync)
for {
(func() {
// 监听 mas 发来的同步时间
lis, err := socket.NewListen("", sl.Node.Port.PortUdpSlaTimeSync, 3).ListenUDP()
// 判断监听是否建立成功
if err != nil {
// 异常抛出
log.Fatalln(err)
}
// 保证监听正常关闭
defer lis.Close()
// 循环接收
for {
// 每个时间戳大小不超过32字节
data := make([]byte, 32)
// 读取时间戳
read, addr, err := lis.ReadFromUDP(data)
// 检查是否接收错误
if err != nil {
// 错误时从新接收
continue
}
// 判断是否为注册服务器所发
if addr != nil && strings.HasPrefix(addr.String(), sl.MasAddr) {
// 转换远程时间戳
l, _ := strconv.ParseInt(fmt.Sprintf("%s", data[0:read]), 10, 64)
//// 转换时间格式
//time := syscall.NsecToTimeval(l)
//// 设置系统时间 "Linux Private Settimeofday"
//if err := syscall.Settimeofday(&time); err != nil {
// // 异常抛出
// log.Fatalln(err)
//}
// 设置到系统
cmd := exec.Command("date", "-s", time.Unix(0, l).Format("01/02/2006 15:04:05.999999999"))
// 设置
cmd.Run()
}
}
})()
}
}
Run code
Cut to clipboard
文章:golang 获取NTP服务器时间并自动设置 发表时间:2023-03-31, 02:53:37
#120
作者:广西南宁市
访问的地址被防火墙给屏蔽了,你需要改成我们国内可用的代理地址
在cmd中输入:
安装GO语言相关插件
在vscode中安装GO语言相关插件的时候,报错:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
在cmd中输入:
go env -w GOPROXY=https://goproxy.cn
Run code
Cut to clipboard
安装GO语言相关插件
在vscode中安装GO语言相关插件的时候,报错:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
文章:Go语言捕获fatal错误,程序异常退出,致命错误 发表时间:2023-03-31, 02:52:05
#121
作者:广西南宁市
svn access to ...forbidden
解决办法清除svn缓存:
TortoiseSVN-> Settings -> Saved Data
然后clear,
主要是最后一个(Authentication data)clear,
或者直接clear all #,广西南宁市,2023-02-24,16:37:01, svn命令行提交新增所有修改的文件
命令行执行svn ci提交的时候,如果是新增的文件,不会被提交
加上svn add命令,即可自动添加新增的文件
然后再执行svn ci命令,即可将新增的文件提交到svn #,广西南宁市,2023-02-24,16:37:57, svn配置钩子后,提交代码提示post-commit hook failed (exit code 255) with no output错误
post-commit hook failed (exit code 255) with no output.
就是我们没有为post-commit赋予执行权限
没有x权限,为post-commit添加x权限
chmod +x post-commit
#,广西南宁市,2023-02-24,16:39:08, svn: line 19: Option expected
修改svnserve.conf时,打开注释时,配置的前面有空格,应该顶格写
解决办法清除svn缓存:
TortoiseSVN-> Settings -> Saved Data
然后clear,
主要是最后一个(Authentication data)clear,
或者直接clear all
svn add . --no-ignore --force
svn ci -m "提交所有全部文件"
Run code
Cut to clipboard
命令行执行svn ci提交的时候,如果是新增的文件,不会被提交
加上svn add命令,即可自动添加新增的文件
然后再执行svn ci命令,即可将新增的文件提交到svn
post-commit hook failed (exit code 255) with no output.
就是我们没有为post-commit赋予执行权限
没有x权限,为post-commit添加x权限
chmod +x post-commit
修改svnserve.conf时,打开注释时,配置的前面有空格,应该顶格写
文章:Linux系统中svn服务器设置开机启动 发表时间:2020-07-12, 18:53:24
#122
作者:广西南宁市
[mysqld]
port=3306
log_bin_trust_function_creators=1
port=3306
log_bin_trust_function_creators=1
文章:解决myql Error Code : 1060 Duplicate column name 'xxx' 问题 发表时间:2023-02-20, 00:57:19
#123
作者:广西南宁市
[Err] 1060 - Duplicate column name 'XXX'
在mysql中,多个表联合查询时,出现错误:[Err] 1060 - Duplicate column name 'XXX'
原因:
使用的是:select * 操作,造成了列名重复,例如a表里面有列名'content',b表里面也有列名'content',此时就会报错。
解决方法:
直接指定想要返回的是什么,例如:select a.content 来操作。
在mysql中,多个表联合查询时,出现错误:[Err] 1060 - Duplicate column name 'XXX'
原因:
使用的是:select * 操作,造成了列名重复,例如a表里面有列名'content',b表里面也有列名'content',此时就会报错。
解决方法:
直接指定想要返回的是什么,例如:select a.content 来操作。
文章:解决myql Error Code : 1060 Duplicate column name 'xxx' 问题 发表时间:2023-02-20, 00:55:16
#124
作者:广西南宁市
css3 实现瀑布流
#,广西南宁市,2023-01-13,21:05:22, css3瀑布流顶部不对齐,列断裂
问题展现

找了半天,发现是 item 的 margin-bottom 导致的:第一列的最后一个item的margin-bottom跑到第二列第一个item上面了,改成padding-bottom即可,
因为padding属于内容,只要不折断,就不会跑到另一列
.wrap {
margin-top: 50px;
width: 100%;
padding: 0 20px;
/* 瀑布流容器内元素的间隔 */
column-gap:10px;
/* 瀑布容器内排列的列数 */
column-count: 2;
}
.item {
padding: 10px;
border: 1px solid #000;
margin-bottom: 10px;
height: 50px;
/* avoid避免在主体框中插入任何中断(页面,列或区域) */
break-inside: avoid;
}
Run code
Cut to clipboard
问题展现
找了半天,发现是 item 的 margin-bottom 导致的:第一列的最后一个item的margin-bottom跑到第二列第一个item上面了,改成padding-bottom即可,
因为padding属于内容,只要不折断,就不会跑到另一列
文章:js判断一个值是否为数字 发表时间:2023-01-13, 17:14:25
#125
作者:广西南宁市
微信小程序页面自动滚动到指定位置
1.使用wx.createSelectorQuery().select().boundingClientRect()查询到需要滚动到的元素位置
2.使用wx.pageScrollTo()将页面滚动到对应位置
Run code
Cut to clipboard
scrollTo() {
// 1.使用wx.createSelectorQuery()查询到需要滚动到的元素位置
wx.createSelectorQuery().select('.bb4').boundingClientRect(res => {
// 到这里,我们可以从res中读到class为bb4的top,即离顶部的距离(px)
// 2使用wx.pageScrollTo()将页面滚动到对应位置
wx.pageScrollTo({
scrollTop: res.top, // 滚动到的位置(距离顶部 px)
duration: 0 //滚动所需时间 如果不需要滚动过渡动画,设为0(ms)
})
}).exec()
}
Run code
Cut to clipboard
scrollTo() {
// 1.使用wx.createSelectorQuery()查询到需要滚动到的元素位置
wx.createSelectorQuery().select('.bb4').boundingClientRect(res => {
// 2.使用wx.getSysTemInfo()获取设备及页面高度windowHeight(px)
wx.getSystemInfo({
success(ress) {
wx.pageScrollTo({
// 3. 滚动的距离根据设备的页面高度进行微调(px)
scrollTop: res.top - ress.windowHeight/2 + 50,
duration: 200
})
}
})
}).exec()
}
Run code
Cut to clipboard
文章:js判断一个值是否为数字 发表时间:2023-01-13, 17:15:28
#126
作者:广西南宁市
JavaScript 判断是否为数字
jquery中$.isNumeric的源码
jquery中$.isNumeric的源码
!isNaN(parseFloat(value)) && isFinite(value);
Run code
Cut to clipboard
文章:js判断一个值是否为数字 发表时间:2023-01-13, 17:13:44
#128
作者:广西南宁市西乡塘区
Thinkphp的 is null 查询条件是什么,
以及exp表达式如何使用
一、总结
一句话总结:$map['name'] = array('exp','is null');
1、is null判断的常见错误写法有哪些?
$map1['f_jieduan_id']=['=',null];
$map1['f_g_id']=['=',null];
2、
$map1['f_jieduan_id']=['is null'];
$map1['f_g_id']=['is null'];
3、
$map['name'] = array('is',null);//无法实现
2、thinkphp中exp表达式如何使用,作用是什么?
其实就是告诉thinkphp这是原生的sql语句
关于exp表达式:
可支持任何sql语法
如:
$map['id'] = array('between',array(1,5));
可写成:
$map['id'] = array('exp','between (1,5)');
还可用于数据更新:
$data['age'] = array('exp','age+1');
M('user')->where('id=1')->save($data);//该用户的年龄加1
二、Thinkphp的 is null 查询条件,以及exp表达式的使用
Thinkphp中若要用到 is null 查询条件,使用以下方法无法实现:
$map['name'] = array('is',null);//无法实现
可使用exp表达式:
$map['name'] = array('exp','is null');
关于exp表达式:
可支持任何sql语法
如:
$map['id'] = array('between',array(1,5));
可写成:
$map['id'] = array('exp','between (1,5)');
还可用于数据更新:
$data['age'] = array('exp','age+1');
M('user')->where('id=1')->save($data);//该用户的年龄加1
参考:Thinkphp的 is null 查询条件,以及exp表达式的使用 - CSDN博客
https://blog.csdn.net/codercwm/article/details/51523963
三、is null判断的常见错误写法
1、
$map1['f_jieduan_id']=['=',null];
$map1['f_g_id']=['=',null];
2、
$map1['f_jieduan_id']=['is null'];
$map1['f_g_id']=['is null'];
3、
$map['name'] = array('is',null);//无法实现
以及exp表达式如何使用
一、总结
一句话总结:$map['name'] = array('exp','is null');
1、is null判断的常见错误写法有哪些?
$map1['f_jieduan_id']=['=',null];
$map1['f_g_id']=['=',null];
2、
$map1['f_jieduan_id']=['is null'];
$map1['f_g_id']=['is null'];
3、
$map['name'] = array('is',null);//无法实现
2、thinkphp中exp表达式如何使用,作用是什么?
其实就是告诉thinkphp这是原生的sql语句
关于exp表达式:
可支持任何sql语法
如:
$map['id'] = array('between',array(1,5));
可写成:
$map['id'] = array('exp','between (1,5)');
还可用于数据更新:
$data['age'] = array('exp','age+1');
M('user')->where('id=1')->save($data);//该用户的年龄加1
二、Thinkphp的 is null 查询条件,以及exp表达式的使用
Thinkphp中若要用到 is null 查询条件,使用以下方法无法实现:
$map['name'] = array('is',null);//无法实现
可使用exp表达式:
$map['name'] = array('exp','is null');
关于exp表达式:
可支持任何sql语法
如:
$map['id'] = array('between',array(1,5));
可写成:
$map['id'] = array('exp','between (1,5)');
还可用于数据更新:
$data['age'] = array('exp','age+1');
M('user')->where('id=1')->save($data);//该用户的年龄加1
参考:Thinkphp的 is null 查询条件,以及exp表达式的使用 - CSDN博客
https://blog.csdn.net/codercwm/article/details/51523963
三、is null判断的常见错误写法
1、
$map1['f_jieduan_id']=['=',null];
$map1['f_g_id']=['=',null];
2、
$map1['f_jieduan_id']=['is null'];
$map1['f_g_id']=['is null'];
3、
$map['name'] = array('is',null);//无法实现
文章:程序员编程常用网页工具集[游戏] 发表时间:2022-11-24, 15:36:10
#130
作者:广西南宁市西乡塘区
windows无法识别 'git' 命令:exec: "git": executable file not found in %PATH%
choco cmd无法识别
windows安装gitea
注册为Windows服务
要注册为Windows服务,首先以Administrator身份运行 cmd,然后执行以下命令:
sc create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\""
别忘了将 C:\gitea 替换成你的 Gitea 安装目录。
之后在控制面板打开 “Windows Services”,搜索 “gitea”,右键选择 “Run”。在浏览器打开 http://localhost:3000 就可以访问了。(如果你修改了端口,请访问对应的端口,3000是默认端口)。
从Windows服务中删除
以Administrator身份运行 cmd,然后执行以下命令:
sc delete gitea
choco cmd无法识别
windows安装gitea
注册为Windows服务
要注册为Windows服务,首先以Administrator身份运行 cmd,然后执行以下命令:
sc create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\""
别忘了将 C:\gitea 替换成你的 Gitea 安装目录。
之后在控制面板打开 “Windows Services”,搜索 “gitea”,右键选择 “Run”。在浏览器打开 http://localhost:3000 就可以访问了。(如果你修改了端口,请访问对应的端口,3000是默认端口)。
从Windows服务中删除
以Administrator身份运行 cmd,然后执行以下命令:
sc delete gitea
文章:gitea git executable not found 发表时间:2022-11-24, 15:16:30
#131
作者:广西南宁市
switch ($exchange_time) {
case 1 : //本月
//本月起始时间:
$begin_time = date("Y-m-d H:i:s",mktime (0,0,0, date("m"),1,date("Y")));
$end_time = date("Y-m-d H:i:s",mktime (23,59,59, date("m"),date("t"),date("Y")));
break;
case 2 : //上个月
//上个月的起始时间:
$begin_time = date('Y-m-01 00:00:00',strtotime('-1 month'));
$end_time = date("Y-m-d 23:59:59", strtotime(-date('d').'day'));
break;
case 3 : //上上个月
$begin_time = date("Y-m-d H:i:s",mktime(0, 0 , 0,date("m")-2,1,date("Y")));
$end_time = date("Y-m-d H:i:s",mktime(23,59,59,date("m")-1 ,0,date("Y")));
break;
}
echodate("Ymd",strtotime("now")),"\n";
echodate("Ymd",strtotime("-1 week Monday")),"\n";
echodate("Ymd",strtotime("-1 week Sunday")),"\n";
echodate("Ymd",strtotime("+0 week Monday")),"\n";
echodate("Ymd",strtotime("+0 week Sunday")),"\n";
echo"*********第几个月:";
echodate('n');
echo"*********本周周几:";
echodate("w");
echo"*********本月天数:";
echodate("t");
echo"*********";
echo'<br>上周起始时间:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1-7,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7-7,date("Y"))),"\n";
echo'<br>本周起始时间:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"))),"\n";
echo'<br>上月起始时间:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m")-1,1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m") ,0,date("Y"))),"\n";
echo'<br>本月起始时间:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("t"),date("Y"))),"\n";
$season= ceil((date('n'))/3);//当月是第几季度
echo'<br>本季度起始时间:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date("Y"))),date('Y'))),"\n";
$season= ceil((date('n'))/3)-1;//上季度是第几季度
echo'<br>上季度起始时间:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$seas))
Run code
Cut to clipboard
文章:PHP获取今日、昨日、本周、上周、本月、上月、本季、上季、今年、去年 发表时间:2022-10-26, 21:14:35
#132
作者:广西南宁市
TP6 model mysql 语句 where is null 查询写法
#,广西南宁市西乡塘区,2022-10-11,09:34:00,
use think\facade\Db;
use think\db\Raw;
$mode = (new User())->where([
['name','EXP',new Raw('IS NOT NULL')], // 写法一
['mobile','EXP',`DB::raw('IS NULL')`] // 写法二
])->field("*")->select()->toArray()
Run code
Cut to clipboard
$_c1=OrdersRecycleProductsModel::where('time', 'EXP', 'IS NULL')
// ->limit(100)
->count();
// ->select();
Run code
Cut to clipboard
文章:TP6 where is null写法 发表时间:2022-07-29, 09:32:31
#133
作者:山东省烟台市
https://dimtown.com/
搜番
https://sofan.icu/
solji.kim
文章:js+jQuery实现网页打字机效果(带光标)js模拟光标打字 发表时间:2022-08-03, 17:29:54
go mod init 新模块名字
go get -u github.com/gin-gonic/gin