KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

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.

KoolReport Is Free and Open-Source!

KoolReport is a professional php reporting framework which saves you tons of time to construct dynamic data report & dashboard.

  • Connect to various datasources such as MySQL, SQL Server, MongoDB or even from CSV or Excel file.
  • Contain series of powerful built-in data processes for your data manipulation.
  • Generate stunning charts and graphs to help you communicate data insights to your audiences effectively.
  • Integrate seamlessly with any php frameworks such as Laravel, CodeIgniter, Symfony.
Download Now and register our tutorials to get started!

Download KoolReport
bug
solved

QueryBuilder