KoolReport's Forum

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

Strange back-tick behaviour #1051

Closed APP opened this topic on on Aug 20, 2019 - 7 comments

APP commented on Aug 20, 2019

Hello,

We are using the query builder and are trying to make use of the selectRaw method. But we notice some strange behaviour with the back ticks. See the following example:

 DB::table('orders')->selectRaw('price * ? as price_with_tax', [1.0825])->toMySQL();

Gives the following result:

SELECT `[{raw}]price * 1`.`0825 as price_with_tax` FROM `orders`

For some reason it adds back ticks around the expressions. Which breaks the query. I guess this is unwanted behaviour? Is there a workaround for this?

KoolReport commented on Aug 21, 2019

It look like a bug, we are investigating the issue and come back to you soon.

APP commented on Aug 28, 2019

Any update regarding this issue?

APP commented on Sep 2, 2019

Can you at least keep us informed regarding this issue?

KoolReport commented on Sep 2, 2019

Sorry for my late update, Our dev.team has been able to reproduce the case and found the root cause, they are fixing it. Probably we will release new QueryBuilder package version with the fix soon.

KoolReport commented on Sep 4, 2019

We have sent you new version via email, please try to test if all go well. Appreciate your feedback.

APP commented on Sep 4, 2019

Thank you! We have received the new version of the qb. We will get back to you with feedback when we have finished testing the qb.

edit: We have tried the new version and it is now working as expected. Thank you very much for your support!

Bruno Gregorio commented on Sep 19, 2019

I got the same bug and did download the query builder today, is not updated yet?

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