Hello all, I think I’m missing some basic thing here but can’t seem to Google my way to happiness…
I’m trying to use a simple textual variable in a MySQL query to grab the data I want to populate a Grafana gauge (and a bunch of other stuff). The trouble is that I cannot come up with the proper syntax to embed the variable into my MySQL query. In the olden days (< 4.6.0) t seems that Grafane would take care of putting quotes around the variable when referenced in the query, but apparently that is no longer the case. My variable will translate to a string, but the Grafana MySQL interpreter just shoves the string into the query without quotes so, of course, it won’t pass muster. Examples:
What I want: Select * from MyTable where MyType =’<$VariableValue>’; (w/ quotes)
What I get:Select * from MyTable where MyType =<$VariableValue>; (no quotes)
Any ideas?