KoolReport's Forum

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

How to assign a parameter value to sql #1282

Closed iRiyada opened this topic on on Feb 4, 2020 - 1 comments

iRiyada commented on Feb 4, 2020

I am trying to assign value to the variable '@month_count'. But laravel throws "error on query"



$this->src("mysql")
         ->query("set @month_count = :periodicity_id;")        //I want to assign 'periodicity_id' to '@month_count' variable
         ->params(array(":periodicity_id"=>$this->params["periodicity"]))
         ->saveTo($node);


iRiyada commented on Feb 4, 2020

I directly added the parameter instead of assigning to @month_count variable

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

None