KoolReport's Forum

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

Error in query line #1519

Open Richb201 opened this topic on on Jul 8, 2020 - 2 comments

Richb201 commented on Jul 8, 2020

function setup()

{
    $campaign=$_SESSION['campaign'];
    $this->src('substantiator')
        ->query("SELECT bus_comp FROM business_components WHERE campaign=$campaign AND email='richb201@gmail.com'")
        ->pipe(new ColumnRename(array(
        "bus_comp"=>"Business Component")))
        ->pipe($this->dataStore("business_components"))
    ->saveTo($BC);
}

This query line is causing:

An uncaught Exception was encountered Type: Error

Message: Call to a member function execute() on boolean

Filename: /app/vendor/koolreport/core/src/datasources/MySQLDataSource.php

Line Number: 384

Backtrace:

File: /app/vendor/koolreport/core/src/KoolReport.php Line: 315 Function: start

KoolReport commented on Jul 8, 2020

I guess you need 2 things:

  1. Make sure $_SESSION["campaign"] is available
  2. Put quote arround $campaign variable:
... WHERE campaign='$campaign' ...
Richb201 commented on Jul 8, 2020

worked great. thx!

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
solved

None