|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 2:51 PM
Points: 62,
Visits: 240
|
|
I have a report that accesses a MySql (5.1) database and the query runs fine, but I want to be able to use a parameter in the query. I have tried using the @ sign like that used in Sql Server and also the "?" sign as per some of the articles I have seen for MySql but neither seem to work...Here is a part of the query that I am trying to change to use a parameter:
SELECT h.Host, Date(from_unixtime(clock)) as TempDate, Hour(from_unixtime(clock)) DIV 4 as IntervalY, Min(Value) as MinTemp, Max(Value) as MaxTemp FROM `zabbix`.`history_uint` hu join `zabbix`.`items` i on hu.itemid = i.itemid join `zabbix`.`hosts` h on i.hostid = h.hostid where hu.itemid = 100100000155581
I want to be able to pass in different Itemid ...
Thanks in advance for any help...
|
|
|
|