摘要: public function findLastClass($id) { $classInfo = Db::name('class')->where('id', $id)->find(); if ($classInfo && $classInfo['islast'] == 1) { // 如果当前记 阅读全文
posted @ 2024-05-11 19:10 85541585 阅读(12) 评论(0) 推荐(0) 编辑
摘要: function formatDate(date) { var date = new Date(date); var YY = date.getFullYear() + '-'; var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() 阅读全文
posted @ 2024-02-11 17:53 85541585 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Date.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "H+": this.getHours(), // 阅读全文
posted @ 2024-02-11 17:48 85541585 阅读(5) 评论(0) 推荐(0) 编辑
摘要: thinkphp 数据嵌套输出 $list=Db::name('a')->field('id,xxx,...')->group('rwid')->select(); $data['list']=[]; foreach ( $list as $v){ $part=Db::name('a')->fiel 阅读全文
posted @ 2023-03-05 00:28 85541585 阅读(44) 评论(0) 推荐(0) 编辑
摘要: PHP保存$data = preg_replace("/[\r\n]+/", '##', $a); //将回车键替换##保存JS 读取 var str1 = ldata.data.replace(/##/g,"\n"); //将数据##替换成回车显示 阅读全文
posted @ 2023-02-17 10:45 85541585 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 return 返回值进行获取函数内部变量 function test() { var testValue = 'innerValue'; return testValue;} console.log(test()); // 'innerValue'2. 通过闭包方式进行获取函数内部变量 阅读全文
posted @ 2021-09-09 16:37 85541585 阅读(930) 评论(0) 推荐(0) 编辑
摘要: $group=Db::name('auth_group')->select();foreach ($group as $v){ $v['auth_group_access']=Db::name('auth_group_access')->where('group_id',$v['id'])->sel 阅读全文
posted @ 2021-08-08 08:33 85541585 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 换行、回车、空格分隔成数组 var arra2=a2.split(/[(\r\n)\r\n]+/);for(let i=0; i<arra2.length; i++){ if(arra2[i] ""){ arra2.remove(arra2[i]); }} 进行的识别分隔。其中\n代表换行,\r代表 阅读全文
posted @ 2021-07-04 21:05 85541585 阅读(557) 评论(0) 推荐(0) 编辑
摘要: // 方法1:insertGetId方法,新增数据并返回主键值使用getLastInsID Db::name('user')->insert($data); $userId = Db::name('user')->getLastInsID(); // 方法2:使用insertGetId方法 Db:: 阅读全文
posted @ 2021-06-29 23:32 85541585 阅读(3041) 评论(0) 推荐(0) 编辑
摘要: 查找某用户点击a56爆大奖在线娱乐产品的最新的5条记录 SELECT max(id) AS maxid,pid FROM `u_b_history` where uid='1' GROUP BY `pid` ORDER BY `maxid` DESC LIMIT 5 阅读全文
posted @ 2021-06-06 22:06 85541585 阅读(581) 评论(0) 推荐(0) 编辑