5 Star 50 Fork 0

Gitee Community / 码力传递:晒代码赢奖品

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
日常读取数据 571 Bytes
一键复制 编辑 原始数据 按行查看 历史
user_1038126 提交于 2020-06-12 14:29 . add 日常读取数据.
//第一位同事需要test表字段1
$res = db('test')->field('字段1')->find();
if($res['字段1']){
//Do something...
}
//此处省略100行代码
//第二位同事需要test表字段2,于是添加了如下代码
$res = db('test')->field('字段2')->find();
if($res['字段2']){
//Do something...
}
//此处省略再次100行代码
//第三位同事需要test表字段3,于是又添加了如下代码
$res = db('test')->field('字段3')->find();
if($res['字段3']){
//Do something...
}
//此处省略再次100行代码
//哈哈哈
1
https://gitee.com/gitee-community/gitee-7th-event-3.git
git@gitee.com:gitee-community/gitee-7th-event-3.git
gitee-community
gitee-7th-event-3
码力传递:晒代码赢奖品
master

搜索帮助