KoolReport's Forum

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

Generating an Array From Koolreport QueryBuilder #1964

Open Awet Kibreab opened this topic on on Mar 11, 2021 - 3 comments

Awet Kibreab commented on Mar 11, 2021

Can I generate any array using a query method of the query builder and store it in associated array or object wise. How do I do that ...

Sebastian Morales commented on Mar 12, 2021

Pls try this method:

https://www.koolreport.com/docs/querybuilder/overview/#serialize-toarray

Let us know if you need smth else. Tks,

Awet Kibreab commented on Mar 13, 2021

What I need is to get the result of the query like $this->src("xyz")->query(DB::table('tableName')->select('fields')) in form of array and supply it in foreach function

Sebastian Morales commented on Mar 15, 2021

Pls try this code:

    $result = $this->src("xyz")->query(DB::table('tableName')->select('fields'))
    ->requestDataSending();
    foreach ($result as $row) {
        ...
    }

Let us know if it's what you want. Rgds,

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
suggestion

None