Skip to content

Commit

Permalink
nv3d chart viz: quote name various select fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pollen8 committed Oct 7, 2015
1 parent b2c89f3 commit bb92dc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/fabrik_visualization/nvd3_chart/models/nvd3_chart.php
Expand Up @@ -134,7 +134,7 @@ public function getData()
$tbl = $params->get('tbl', '');
$value = $params->get('value_field');
$label = $params->get('label_field');
$query->select($label . ' AS label, ' . $value . ' AS value')->from($tbl);
$query->select($db->qn($label) . ' AS label, ' . $db->qn($value) . ' AS value')->from($tbl);
$db->setQuery($query);
$this->data->values = $db->loadObjectList();
$this->data = array($this->data);
Expand Down Expand Up @@ -403,17 +403,17 @@ protected function mulitLines()

$db = FabrikWorker::getDbo(false, $params->get('conn_id'));
$query = $db->getQuery(true);
$query->select($labelColumns)->from($table);
$query->select($db->qn($labelColumns))->from($table);

if ($split !== '')
{
$query->select($split . ' AS ' . $db->qn('key'));
$query->select($db->qn($split) . ' AS ' . $db->qn('key'));
}
else
{
if ($params->get('data_mode') == 0)
{
$query->select('date AS ' . $db->qn('key'));
$query->select($db->qn('date') . ' AS ' . $db->qn('key'));
}
}

Expand Down

0 comments on commit bb92dc0

Please sign in to comment.