KoolReport's Forum

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

Dynamic QueryBuilder #1078

Closed Mike Carroll opened this topic on on Sep 10, 2019 - 1 comments

Mike Carroll commented on Sep 10, 2019

Are there any examples on how to use query builder but in a dynamic fashion. From the examples, they appear to all be static. Hope my question makes sense.

KoolReport commented on Sep 11, 2019

Let say you have report parameter like $this->params["start_date"] and $this->params["end_date"] you can do:

DB::table("orders")->whereBetween(
    "order_date",
    [$this->params["start_date"],$this->params["end_date"]]
);

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
None yet

QueryBuilder