KoolReport's Forum

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

Convert Existing MySQL query to querybuilder object #3296

Open Avninder opened this topic on on May 21 - 2 comments

Avninder commented on May 21

The project i am working on uses querybuilder from koolreport. We normally render the querybuilder to allow admin to generate the query dynamically. But now I have a function which gives me MySql query for my DB itself, i want that query to be converted into query builder object so that i can use the already existing logic for saving it to DB. Can someone guide my on how to do this.

The main reason for this is because i am using chartbuilder along with querybuilder and as chartbuilder uses queryparams to buid the query back, i need a way to convert my query to those respective queryparams.

Sebastian Morales commented on May 22

I think what you require is a SQL parser to parse your query into parts and map those parts to a QueryBuilder object.

Avninder commented on May 22

Can you recommend a package, module or docs that can help me do that as the output params need to match those of visualquery builder in koolreport.

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
help needed

QueryBuilder