Is there a restriction that's causing the following problem? Local variables seem to cause no results. I could get around this with inline values and parameters, but just good to know.
These work in mysql workbench:
set @interval_months = 5;
set @tz_adjust = TIMESTAMPDIFF(HOUR, NOW(), UTC_TIMESTAMP);
results in:
You are here
Home
Status message
SQL: /*
Data from x months ago until yesterday
*/
set @interval_months = 5;
set @tz_adjust = TIMESTAMPDIFF(HOUR, NOW(), UTC_TIMESTAMP);
select ticketid,FROM_UNIXTIME(dateline) AS 'Created Date',email,ownerstaffname,firstresponsetime/3600 AS 'Response Time' from swtickets LIMIT 100;
SQL: /*
Data from x months ago until yesterday
*/
set @interval_months = 5;
set @tz_adjust = TIMESTAMPDIFF(HOUR, NOW(), UTC_TIMESTAMP);
select ticketid,FROM_UNIXTIME(dateline) AS 'Created Date',email,ownerstaffname,firstresponsetime/3600 AS 'Response Time' from swtickets LIMIT 100;
Warning message
Sample data is required in order to correctly generate a template. Try changing parameters
Comments
Comment #1
metzlerd CreditAttribution: metzlerd commentedThe real issue here is the multiple statements and not the variables. PDO doesn't support mult-statement SQL by default. I would consider making a change to the data provider so that it would split the data blocks based on ; so that it and send them separately, but It's true that forena does not currently do this.
Changing this to a feature request because of that.
Comment #2
badgerr14 CreditAttribution: badgerr14 commentedThanks for the quick reply! Great to hear it is now a feature request.