Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leftJoin with parameters not work! #296

Open
CrazyPHP opened this issue Jun 20, 2019 · 0 comments
Open

leftJoin with parameters not work! #296

CrazyPHP opened this issue Jun 20, 2019 · 0 comments

Comments

@CrazyPHP
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant