镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

leftJoin with parameters not work! #296

Open

Description

@CrazyPHP

Try something like this:
$query->leftJoin('order_geo ON (order_geo.order_id = order_visit.id AND order_geo.order_type = :order_type)', [':order_type'=>'visit']);

and you will get error:
PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in ...

becouse parameter was saved in $parameters in wrong way:
array(4) { [0]=> array(1) { [":order_type"]=> string(5) "visit" } [":status"]=> string(2) "on" }

Fluentpdo save it as additional inner array, instead of saving the parameter simply as an element of the array.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions