Skip to content

Db的join函数使用bug #3182

@Dqiucheng

Description

@Dqiucheng

所属功能组件

路由(Route)

ThinkPHP 版本

8.1.3

操作系统

windows

错误信息

1、使用->join(Db::raw())参数类型错误
2、使用->join("xxx AS oc FORCE INDEX(x)" 报错没有表,实际是有的,去掉FORCE INDEX(x)就能正常执行,因为这时候自动把表前缀带上了,加上FORCE INDEX(x)后不自动带表前缀了。

很恶心

其它说明

public function join(array | string | Raw $join, ?string $condition = null, string $type = 'INNER', array $bind = [])
函数明明写着支持Raw,但是在之后的生成sql环节报类型错误

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions