Use explicit column names in elec_choices_get

This commit is contained in:
Tobias Mueller 2009-06-06 16:06:06 +02:00
parent f8b0d3d4ef
commit f3b14cd472

View file

@ -156,7 +156,7 @@ function elec_choices_get ($handle, $election_id) {
$escaped_election_id = mysql_real_escape_string ($election_id, $handle); $escaped_election_id = mysql_real_escape_string ($election_id, $handle);
$query = "SELECT * FROM " . $choices_table; $query = "SELECT choice, id FROM " . $choices_table;
$query .= " WHERE election_id = '".$escaped_election_id."'"; $query .= " WHERE election_id = '".$escaped_election_id."'";
$query .= " ORDER BY id"; $query .= " ORDER BY id";