如何将之前为 0001 的字段增加 +1,然后变为 0002?我目前正在使用以下命令:
SELECT fieldA+1
FROM table
WHERE ID = 1234;
Run Code Online (Sandbox Code Playgroud)
但这只是将 0001 变成 2
这是一个非常基本的问题,但我不明白
例如,我有以下字符串:
"20 Secured file A"
"20 Secured 20 files: A, B, ...."
"22 Deleted file A"
"22 Deleted 22 files: A, B, ...."
"24 Moved file A"
"24 Moved 24 files: A, B, ...."
"28 Corrupt file A"
"28 Corrupt 28 files: A, B, ...."
"All correct 20 files: A, B, ...."
"All correct 22 files: A, B, ...."
"All correct 24 files: A, B, ...."
"All correct 28 files: A, B, ...."
Run Code Online (Sandbox Code Playgroud)
我可以使用 PHP 中的哪个函数来搜索精确的“20”并剪切它?我测试的所有功能只让我搜索“20”而不是“20”,因此第二个案例削减了 2x“20”而不是第一个“20”。
我只需要一个可以剪切前三个字母的代码,但前提是它们以“20”、“22”、“24”或“28”开头
非常感谢 :) …