
tp5
dev-tonyang
好好学习,天天向上
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
thinkphp之max函数出现的问题
这里将code_sn字段的varchar类型改为int 或者bigint 后再使用Db::name('code')->max('code_sn');或者 Db::name('code')->limit(1)->order('code_sn desc')->value('code_sn');使用Db::name('code')->max('code_sn');或者 Db::name('code')->limit(1)->order('code_sn desc')->value('code_sn');原创 2023-05-24 15:43:24 · 580 阅读 · 1 评论 -
tp5 where中的or使用
实现类似下图这种多选的筛选 类似SQL: SELECTidascargoods_id,`name`,`image`,`price`FROM`fa_cargoods`WHERE`status`='normal'AND`carcountry_id`IN(1,2)AND`carspeed_id`IN(1,2)AND`carhbbz_id`IN(1,2)AND`carstructure_id`IN(1,2)AND`caroutvol_id`...原创 2021-11-30 14:23:33 · 769 阅读 · 0 评论 -
mac tp5 Apache 隐藏index.php入口文件
下面是Apache的配置过程,可以参考下: 1、httpd.conf配置文件中加载了mod_rewrite.so模块 2、Options Indexes FollowSymLinks MultiViews AllowOverride None将None改为All 3、在应用入口文件同级目录添加.htaccess文件,内容如下: <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine on ...转载 2021-03-24 22:33:30 · 258 阅读 · 1 评论 -
tp5执行原生sql报错
$timestamp = time(); $start_time = date(‘Y-m-d 00:00:00’, strtotime(“this week Monday”, $timestamp)); $end_time = date(‘Y-m-d 23:59:59’, strtotime(“this week Sunday”, $timestamp)); KaTeX parse erro...原创 2019-03-06 15:54:22 · 927 阅读 · 0 评论