Skip to content

Commit

Permalink
Quote column names
Browse files Browse the repository at this point in the history
  • Loading branch information
trob committed Mar 27, 2014
1 parent 19e0ec4 commit 366b3eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function validate($data, $repeatCounter)
$lookuptable = $db->quoteName($table->db_table_name);
$data = $db->quote($data);
$query = $db->getQuery(true);
$query->select('COUNT(*)')->from($lookuptable)->where($elementModel->getFullName(false, false) . ' = ' . $data);
$query->select('COUNT(*)')->from($lookuptable)->where($db->quoteName($elementModel->getFullName(false, false)) . ' = ' . $data);
$listModel->buildQueryJoin($query);

if (!empty($otherfield))
Expand All @@ -88,7 +88,7 @@ public function validate($data, $repeatCounter)
$v = JArrayHelper::getValue($v, 0, '');
}

$query->where($otherfield . ' = ' . $db->quote($v));
$query->where($db->quoteName($otherfield) . ' = ' . $db->quote($v));
}

/* $$$ hugh - need to check to see if we're editing a record, otherwise
Expand Down

0 comments on commit 366b3eb

Please sign in to comment.