文章分类 -  tp5

摘要:composer update topthink/framework 5.1.15 composer update topthink/framework=5.1.15 composer update topthink/framework:5.1.15 后面的5.1.15改成想要升级的版本即可。指定版 阅读全文
posted @ 2022-10-27 09:30 星云惊蛰 阅读(84) 评论(0) 推荐(0) 编辑
摘要:创建validate文件 <?php namespace app\crm\validate; use think\Validate; /** * 设置模型 */ class InvoiceInfoLogic extends Validate{ protected $rule = [ 'tax_num 阅读全文
posted @ 2022-07-07 18:25 星云惊蛰 阅读(22) 评论(0) 推荐(0) 编辑
摘要:添加数据insert $data = [ 'name_cn' => '张三', 'name_en' => 'jack', ]; $res = Db::name('style')->insert($data); 添加数据。 INSERT INTO `tf_style` (`name_cn` , `na 阅读全文
posted @ 2021-05-10 18:31 星云惊蛰 阅读(28) 评论(0) 推荐(0) 编辑
摘要:实测: $id = Session::get('id');$where = [ 'i.tp_id'=>[['eq',$id],['eq',0],'or'], 'i.status'=>['eq',1]];$params = Db::table("ad_img")->alias('i') ->join( 阅读全文
posted @ 2021-04-13 17:39 星云惊蛰 阅读(4698) 评论(0) 推荐(0) 编辑
摘要:zhuan:https://www.it610.com/article/1280025294710784000.htm 获取sql语句 getLastSql $res = Db::table('staff')->field('id,salary')->where('id','>',1) ->grou 阅读全文
posted @ 2021-04-13 17:37 星云惊蛰 阅读(1505) 评论(0) 推荐(0) 编辑
摘要:<?php namespace app\index\controller; use think\Db; class Index { public function index() { } public function insert() { #插入数据(原生) $result3 = Db::exec 阅读全文
posted @ 2021-04-12 17:38 星云惊蛰 阅读(58) 评论(0) 推荐(0) 编辑