I cant find documentation for 1.4 database schema and its not obvious to me how to do this just by looking at the table descriptions, but can somebody help me with the query that will extract list of host which have certain template associated to them? Thanks!
Ad Widget
Collapse
Help with database query
Collapse
X
-
THganks, works great.Originally posted by CalimeroMaybe you could try this:
Code:SELECT h.hostid, h.host, t.host AS template_name FROM hosts_templates AS h_tpl JOIN hosts AS h ON h.hostid = h_tpl.hostid JOIN hosts AS t ON t.hostid = h_tpl.templateid AND t.status = 3 WHERE t.host = '<tpl name>'
Comment
Comment