- 博客(2)
- 收藏
- 关注
原创 php 数组解析为树型结构
在程序在经常会遇到树形的数据,而在mysql中没有提供递归查询的方法,当然也可以用 mysql 的 自定义函数或者存储过程来实现,不过写方法依赖数据库不方便以后的数据迁移下面。下面是我用代码实现的方法:// 测试数据 public function test() { $data = array( ['id'=>1, 'father_id'=>0], ['id'
2016-07-27 09:41:30 583
原创 mysql 中 You can't specify target table <tbl> for update in FROM clause 错误解决方法
You can’t specify target table tbl for update in FROM clause 在mysql中当在一句sql中先后执行对同一张表的select 和 update 或 delete 操作时,就会报错: You can't specify target table tbl for update in FROM clause 例如: update t...
2016-07-02 22:14:03 579
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人