KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Raw methods ignore bindings / placeholders #1075

Closed APP opened this topic on on Sep 4, 2019 - 5 comments

APP commented on Sep 4, 2019

Hello,

We found another issue in the query builder. Regarding to this example from the documentation you can provide an array with values as a second argument. Those values then should replace the question marks.

DB::table('orders')->whereRaw('price > IF(state = "TX", ?, 100)', [200])

But the array with values is ignored. SELECT * FROM `orders` WHERE price > IF(state = "TX", ?, 100)

Instead of SELECT * FROM `orders` WHERE price > IF(state = "TX", 200, 100)

It seams that the params argument is totally ignored in the whereRaw method. No need to rush on this one, we can work around it for the time being.

KoolReport commented on Sep 5, 2019

Thank you for letting us know. The issue has been fixed and will be available in official release of QueryBuilder package.

APP commented on Sep 27, 2019

When are you gonna update the composer repo? there are 2 fixes related tot the query build and it's not very handy to use a custom copy of your composer package. Please enroll hotfixes asap and dont wait weeks/months.

KoolReport commented on Sep 29, 2019

Sorry for the late. We have release 2.0.0 on github, you can use composer to install the version now.

APP commented on Oct 8, 2019

This isn't mentioned in the changelog? But it's in the new version?

KoolReport commented on Oct 8, 2019

Yes it is in new version.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
bug
solved

QueryBuilder