php-reports icon indicating copy to clipboard operation
php-reports copied to clipboard

Pass Header Variable in query

Open iannashon opened this issue 9 years ago • 1 comments

Hello, I am running below report but can seem to pass variable in query

-- All Registered User -- This is a report that lists all registered user -- VARIABLE: { name: "userid", display: "User Id" }

SELECT * FROM tbl_user WHERE userid = "{{userid}}";

But every time i run it i cant pass userid on query

Thank you

iannashon avatar Dec 31 '16 07:12 iannashon

Your report looks to be correct. I copied it into a file, changed the table and column names to ones that work for my database, and verified that the report works correctly.

You say it does not work. Do you get an error? no results? blank page? Look in your web server error log file (e.g. /var/log/apache2/error.log on Linux) for more information.

Do you see a "show query" link at the bottom of the generated report? If so, could you click it and inspect the query that's being generated? Or paste it into a reply here?

edu-bob avatar May 23 '17 23:05 edu-bob