KoolReport's Forum

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

WhereRaw restults in [{raw}] statement in sql #1295

Closed APP opened this topic on on Feb 11, 2020 - 5 comments

APP commented on Feb 11, 2020

We are using querybuilder 2.0 and we are seeing the following behaviour:

$test = (new Query())->whereRaw('price > IF(state = "TX", ?, 100)', [200])->from('test');
echo $test->toMySQL();

Results in

SELECT * FROM test WHERE [{raw}] price > IF(state = "TX", 200, 100)

There's an [{raw}] statement in the query, which shouldn't be there

KoolReport commented on Feb 11, 2020

Thank you for letting us know. We have fixed the issue with QueryBuilder 2.5.0, you may download now or install it with composer. We have not released with KoolReport Pro yet.

APP commented on Feb 12, 2020

Right now koolreport 4.5.1 has a fixed version of querybuilder 2.0?

koolreport/pro  4.5.1                   requires  koolreport/querybuilder (2.0.0)

When will the qb 2.5.0 become available with Koolreport?

KoolReport commented on Feb 12, 2020

Actually instead of using requires the Koolreport Pro 4.5.1, you can require each packages separately. In this way you can only add the packages that you need:

"requires":{
    "koolreport/core":"4.5.1",
    "koolreport/querybuilder":"2.5.0",
    ...
}

We are gathering other hot fixes to release new koolreport pro version.

APP commented on Feb 12, 2020

Perfect! It seems to work. Thanks for explaining.

KoolReport commented on Feb 12, 2020

Great!

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