KoolReport's Forum

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

Raw methods ignore bindings / placeholders #1075

Open APP opened this topic on on Sep 4 - 1 comments

APP commented on Sep 4


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

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

Give tips to supporter for his good work

If you feel that supporter has done a good work, consider giving him some credit. Any amount put into the tips box below is appreciated. By doing so, you have contribtuted to the existence of KoolReport and the quality of support.

Tips box