Skip to content

Commit

Permalink
QA: Fixing #5702 - SQL Errors
Browse files Browse the repository at this point in the history
This should fixup that error.  Thanks for checking.
  • Loading branch information
TheWitness committed Mar 23, 2024
1 parent ffc9364 commit 8c5a113
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions graph.php
Expand Up @@ -102,9 +102,13 @@
</tr>
<?php

$graph = db_fetch_row_prepared('SELECT local_graph_id, width, height, graph_template_id
FROM graph_templates_graph
WHERE local_graph_id = ?',
$graph = db_fetch_row_prepared('SELECT gtg.local_graph_id, width, height, title_cache, gtg.graph_template_id, h.id AS host_id, h.disabled
FROM graph_templates_graph AS gtg
INNER JOIN graph_local AS gl
ON gtg.local_graph_id = gl.id
LEFT JOIN host AS h
ON gl.host_id = h.id
WHERE gtg.local_graph_id = ?',
array(get_request_var('local_graph_id')));

$graph_template_id = $graph['graph_template_id'];
Expand Down Expand Up @@ -363,11 +367,13 @@ function initializeGraph() {
$graph_start--;
}

$graph = db_fetch_row_prepared('SELECT width, height, title_cache, local_graph_id, graph_template_id, h.id AS host_id, h.disabled
$graph = db_fetch_row_prepared('SELECT gtg.local_graph_id, width, height, title_cache, gtg.graph_template_id, h.id AS host_id, h.disabled
FROM graph_templates_graph AS gtg
INNER JOIN graph_local AS gl
ON gtg.local_graph_id = gl.id
LEFT JOIN host AS h
ON gtg.host_id = h.id
WHERE local_graph_id = ?',
ON gl.host_id = h.id
WHERE gtg.local_graph_id = ?',
array(get_request_var('local_graph_id')));

$graph_height = $graph['height'];
Expand Down

0 comments on commit 8c5a113

Please sign in to comment.