think-orm icon indicating copy to clipboard operation
think-orm copied to clipboard

Think ORM——the PHP Database&ORM Framework

Results 251 think-orm issues
Sort by recently updated
recently updated
newest added

vendor/topthink/think-orm/src/db/builder/Mongo.php:113 } elseif (isset($val[0]) && 'exp' === $val[0]) { $result[$item] = $val[1]; } Db::name('test')->insert(['key'=> 1, 'data' => [0]]); 当data存为[0]时报错,原因 $val[0] 为整形0 等于 字符串 'exp' echo 'exp' == 0; 为true ,应该用...

MongoDb

PDOConnection.php文件 大概750行 public function getPDOStatement( ...... $sql=$sql.'/* XX程序--xx参数*/' ;//可以增加这个吗 或者有什么更好的方法 这样可以快速定位到具体 应用上的问题 // 预处理 $this->PDOStatement = $this->linkID->prepare($sql); )

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /srv/sync/vendor/topthink/think-orm/src/db/concern/ParamsBind.php on line 52 ![image](https://user-images.githubusercontent.com/1581783/178645920-6ab3eef8-192a-41c9-ad4a-5df038ef21de.png) 看样子是bind参数没有释放,临时方法每次查询完后getBind(true)来清空bind

error: Return value of think\\db\\PDOConnection::pdoQuery() must be of the type array, bool returned file: /vendor/topthink/think-orm/src/db/PDOConnection.php line: 695 old ``` if ($query->getOptions('cache')) { // 检查查询缓存 $cacheItem = $this->parseCache($query, $query->getOptions('cache')); $key =...

transactionXa源码中 所有$xid都是用同一个,生成方式为 $xid = uniqid('xa'); 我们现在实际生产环境中出现这种情况: 同一个实例中(同一台数据库服务器),有个多DB。每个DB的连接信息都不一样。 使用的时候存在每个DB都是单独连接的。 假设有Order库、Member库在同一个实例上(同一台机器上),Order与Member的都有自己的连接信息,使用过程中Order与Member都会各自建立连接。 这时候要同时操作Order与Member库,就构成了分布式事务。 按照现在的写法,同一个实例的两个库的两个连接使用相同的xid去操作,XA会报错的! 因为同一个实例上同一个xid只能开启一次。

mongo sql:db.crontab_log.find({"$text":{"$search":"A6705B1I019C80"}}).sort({"create_time":-1}).skip(0).limit(15) 请问tp6要怎么编写呢? 还有请问怎么获取 mongo 原生语句呢

MongoDb

优化IDE中的Db类提示

关于 \Exception | \Throwable $e 的疑问 Exception implements Throwable 那么是否单独写成 \Throwable $e 是否也可以满足

### 多态关联中当多态类型未定义时,查询会抛出异常,且异常内容不明确,不便于用户获知问题所在。 ### 问题场景 如下三张表: ``` article id - integer title - string content - text book id - integer title - string comment id - integer content - text...